You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command line arguments should be configured so that results can be reproduced, and one can run new experiments, without having to modify any of the actual codebase. I'm having some issues in doing this with the current project structure (i.e. one has to import a level up) and also with the ugliness of passing parameters from command line args to functions (I haven't been able to find a nice way to do this, i.e. something like f(*args, **kwargs)).
The text was updated successfully, but these errors were encountered:
You could also directly pass in args into run() in main.py. The run() functions can then take whatever parameters they need from the args. For example, instead of doing
def run():
name = "train"
is_ptr = True
hidden_dim = embedding_dim = 256
[the rest of your code]
you can just do
def run(args):
name = args.name
is_ptr = args.ptr
hidden_dim = embedding_dim = args.hidden_dim
[the rest of your code]
Command line arguments should be configured so that results can be reproduced, and one can run new experiments, without having to modify any of the actual codebase. I'm having some issues in doing this with the current project structure (i.e. one has to import a level up) and also with the ugliness of passing parameters from command line args to functions (I haven't been able to find a nice way to do this, i.e. something like f(*args, **kwargs)).
The text was updated successfully, but these errors were encountered: