Open nblskr opened 1 year ago
Hello Ruoqi, I was trying to run the DeepIPW model using the python command, but for some reason I keep getting this error:
args: Namespace(data_dir='../user_cohort/', pickles_dir='pickles', treated_drug_file=None, controlled_drug='random', controlled_drug_ratio=3, random_seed=128, batch_size=50, diag_emb_size=128, med_emb_size=128, med_hidden_size=64, diag_hidden_size=64, learning_rate=0.001, weight_decay=1e-06, epochs=10, save_model_filename='tmp/1346823.pt', outputs_lstm=None, outputs_lr=None, save_db=None, cuda=False, device=device(type='cpu')) Traceback (most recent call last): File "C:\Users\nabil\Study\Research\code\DeepIPW-master\deep-ipw\main.py", line 326, in <module> main(args=parse_args()) File "C:\Users\nabil\Study\Research\code\DeepIPW-master\deep-ipw\main.py", line 47, in main output_lstm = open(args.outputs_lstm, 'a') TypeError: expected str, bytes or os.PathLike object, not NoneType
I'm not sure what's wrong
thank you very much,
你好,该问题是作者没有详细的指出数据参数的设置,--data_dir ;--treated_drug_file;--save_model_filename;--outputs_lstm;--outputs_lr;--save_db都需要设置,作者在运行启动程序run_lstm.sh中有写道,但并没有在main中提及。
Hello Ruoqi, I was trying to run the DeepIPW model using the python command, but for some reason I keep getting this error:
args: Namespace(data_dir='../user_cohort/', pickles_dir='pickles', treated_drug_file=None, controlled_drug='random', controlled_drug_ratio=3, random_seed=128, batch_size=50, diag_emb_size=128, med_emb_size=128, med_hidden_size=64, diag_hidden_size=64, learning_rate=0.001, weight_decay=1e-06, epochs=10, save_model_filename='tmp/1346823.pt', outputs_lstm=None, outputs_lr=None, save_db=None, cuda=False, device=device(type='cpu')) Traceback (most recent call last): File "C:\Users\nabil\Study\Research\code\DeepIPW-master\deep-ipw\main.py", line 326, in <module> main(args=parse_args()) File "C:\Users\nabil\Study\Research\code\DeepIPW-master\deep-ipw\main.py", line 47, in main output_lstm = open(args.outputs_lstm, 'a') TypeError: expected str, bytes or os.PathLike object, not NoneType
I'm not sure what's wrong
thank you very much,