lukalabs / cakechat

CakeChat: Emotional Generative Dialog System
Apache License 2.0
1.7k stars 935 forks source link

Unable to download or generate new model #12

Closed DonaldM164 closed 6 years ago

DonaldM164 commented 6 years ago

I'm experiencing difficulties with downloading the ready model via tools/download_model.py It would seem that the content from amazon web services cannot be found, see the following from the stack trace:

[22.03.2018 20:40:47.562][WARNING][1108][cakechat.utils.s3.resolver.S3FileResolver][43] File can not be downloaded from AWS S3 because: An error occurred (404) when calling the HeadObject operation: Not Found

It then attempts to create a model which seems to complete successfully.

[22.03.2018 20:40:47.565][INFO][1108][cakechat.dialog_model.model][619] Can't find previously calculated model, so will use a fresh one [22.03.2018 20:40:47.565][INFO][1108][cakechat.dialog_model.model][621] Model is built

However no model is placed in the file path specified by the stack trace. Here is the full result of executing pythons tools/download_model.py.

Any insight into how to resolve this issue would be much appreciated, thank you!

(base) path: >python tools/download_model.py

PATH\Anaconda2\lib\site-packages\gensim\utils.py:855: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
  warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
[22.03.2018 20:37:32.302][INFO][1108][cakechat.tools/download_model.py][21] Fetching and pre-compiling pre-trained model...
[22.03.2018 20:37:32.331][INFO][1108][cakechat.dialog_model.model][598] Initializing NN model with the following params:
[22.03.2018 20:37:32.332][INFO][1108][cakechat.dialog_model.model][600] NN input dimension: 256 (token vector size)
[22.03.2018 20:37:32.332][INFO][1108][cakechat.dialog_model.model][601] NN hidden dimension: 512
[22.03.2018 20:37:32.332][INFO][1108][cakechat.dialog_model.model][602] NN output dimension: 39 (dict size)
[22.03.2018 20:37:35.569][INFO][1108][cakechat.dialog_model.model][407] Compiling predict function (log_prob=False)...
[22.03.2018 20:38:18.410][INFO][1108][cakechat.dialog_model.model][434] Compiling one-step predict function (log_prob=False)...
[22.03.2018 20:38:43.671][INFO][1108][cakechat.dialog_model.model][407] Compiling predict function (log_prob=True)...
[22.03.2018 20:39:12.292][INFO][1108][cakechat.dialog_model.model][434] Compiling one-step predict function (log_prob=True)...
[22.03.2018 20:39:36.957][INFO][1108][cakechat.dialog_model.model][483] Compiling sequence scoring function...
[22.03.2018 20:40:05.703][INFO][1108][cakechat.dialog_model.model][506] Compiling sequence scoring function (with thought vectors as arguments)...
[22.03.2018 20:40:45.812][INFO][1108][cakechat.utils.s3.bucket][21] Getting file
 nn_models\processed_dialogs_gru_hd512_drop0.2_encd2_decd2_il30_cs3_ansl32_lr1.0
_gc_5.0_learnemb_cdim128_window10_voc39_vec128_sgTrue from AWS S3 and saving it
as PATH\cakechat-master\data/nn_models\processed_dialogs_g
ru_hd512_drop0.2_encd2_decd2_il30_cs3_ansl32_lr1.0_gc_5.0_learnemb_cdim128_windo
w10_voc39_vec128_sgTrue
[22.03.2018 20:40:47.562][WARNING][1108][cakechat.utils.s3.resolver.S3FileResolv
er][43] File can not be downloaded from AWS S3 because: An error occurred (404)
when calling the HeadObject operation: Not Found
[22.03.2018 20:40:47.565][INFO][1108][cakechat.dialog_model.model][619] Can't fi
nd previously calculated model, so will use a fresh one
[22.03.2018 20:40:47.565][INFO][1108][cakechat.dialog_model.model][621] Model is
 built

[22.03.2018 20:40:47.625][INFO][1108][cakechat.dialog_model.model][625] Model pa
th is PATH\cakechat-master\data/nn_models\processed_dialog
s_gru_hd512_drop0.2_encd2_decd2_il30_cs3_ansl32_lr1.0_gc_5.0_learnemb_cdim128_window10_voc39_vec128_sgTrue

Traceback (most recent call last):
  File "tools/download_model.py", line 22, in <module> get_trained_model(fetch_from_s3=True)
  File "PATH\cakechat-master\cakechat\dialog_model\factory.py", line 53, in get_trained_model
    raise Exception('Can\'t get the model. '
Exception: Can't get the model. Run tools/download_model.py first to get all required files or train it by yourself.
khalman-m commented 6 years ago

Hello! Thank you for opening the issue.

Seems like there was a bug that only appeared under Windows OS. Please try this PR https://github.com/lukalabs/cakechat/pull/13

DonaldM164 commented 6 years ago

Hello! Thank you for opening the issue. Seems like there was a bug that only appeared under Windows OS. Please try this PR #13

Thank you for your prompt response. I made the changes but the problem still persists with the same stack trace message.

khalman-m commented 6 years ago

@DonaldM164 Sorry for the late response

Can you please try https://github.com/lukalabs/cakechat/pull/13 again and tell if it still doesn't work?

Thank you

DonaldM164 commented 6 years ago

It's quite alright!

Sure, I'll give it a try tonight.

DonaldM164 commented 6 years ago

It works!