XiangLi1999 / Diffusion-LM

Diffusion-LM
Apache License 2.0
1.02k stars 133 forks source link

I wander where to find the model in the predictability #52

Open Layort opened 1 year ago

Layort commented 1 year ago

I've succesfully run the TrainLoop() function and generate a model, and i get some result with batch_decode.py file. But to my surprise, I found that the models I need to run ppl_uner_ar.py weren't in the files it should be, namely that they weren't gernerated. The code in batch_decode is as follows: if modality == 'pos': model_name_path = 'predictability/diff_models/pos_e=15_b=20_m=gpt2_wikitext-103-raw-v1_s=102' elif modality == 'synth': if kk == 128: model_name_path = 'predictability/diff_models/synth_e=15_b=10_m=gpt2_wikitext-103-raw-v1_None' else: model_name_path = 'predictability/diff_models/synth_e=15_b=20_m=gpt2_wikitext-103-raw-v1_None' elif modality == 'e2e-tgt': model_name_path = "predictability/diff_models/e2e-tgt_e=15_b=20_m=gpt2_wikitext-103-raw-v1_101_None" elif modality == 'roc': model_name_path = "predictability/diff_models/roc_e=6_b=10_m=gpt2_wikitext-103-raw-v1_101_wp_pad_v1" elif modality == 'e2e': COMMAND1 = f"python diffusion_lm/e2e_data/mbr.py {out_path2}" os.system(COMMAND1) COMMAND2 = f"python e2e-metrics/measure_scores.py " \ f"diffusion_lm/improved_diffusion/out_gen_v2_dropout2/1_valid_gold " \ f"{out_path2}.clean -p -t -H > {os.path.join(os.path.split(tgt)[0], 'e2e_valid_eval.txt')}" print(COMMAND2) os.system(COMMAND2) continue I found that the model_name_path was not existent. And i wander why it happened and how can i solve this ploblem?

scvready123 commented 1 year ago

Sorry I don't know how to solve this question,but can I ask you one question?That is how to use the batch_decode.py,I successfully run the run_train.py and have already trained a model, but I don't konw how to use it to generate txts.