swansonk14 / typed-argument-parser

Typed argument parser for Python
MIT License
497 stars 40 forks source link

Bug in writing reproducibility section to file #57

Closed hesther closed 2 years ago

hesther commented 3 years ago

Hi, thanks for this great project!

I encountered an error when using tap within Chemprop when training a model within a folder that is a git repo, but without origin specified (see Chemprop PR 195). To reproduce the error: mkdir test; cd test; git init python <path_to_chemprop>/train.py --data_path <path_to_data_csv> --dataset_type regression This is a tap issue since when writing arguments to file, it runs git remote get-url origin, in the current folder, not in the chemprop folder, i.e. the folder <path_to_chemprop> (which would be correct). Is there any way to fix it? I have now introduced a workaround in Chemprop where I write the arguments without the reproducibility section, but it would be great if this issue would be fixed at some point.

Thanks!

swansonk14 commented 3 years ago

Hi @hesther,

Thank you for letting us know about that issue! As of Tap version 1.7.1, the reproducibility information now comes from the git repo of the file that is run (in your case, Chemprop's <path_to_chemprop>/train.py) rather than the git repo that you are currently in. Hopefully this should fix your issue!

Best, Kyle and Jesse