Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while running the main python code #4

Open
nblskr opened this issue Feb 6, 2023 · 1 comment
Open

error while running the main python code #4

nblskr opened this issue Feb 6, 2023 · 1 comment

Comments

@nblskr
Copy link

nblskr commented Feb 6, 2023

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,

@QinQG
Copy link

QinQG commented Mar 21, 2024

你好,该问题是作者没有详细的指出数据参数的设置,--data_dir ;--treated_drug_file;--save_model_filename;--outputs_lstm;--outputs_lr;--save_db都需要设置,作者在运行启动程序run_lstm.sh中有写道,但并没有在main中提及。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants