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
Python now gets the absolute path of the script filename specified on the command line (ex: python3 script.py): the file attribute of the main module became an absolute path, rather than a relative path.
We should replace the if statement with using argparse library. It's relatively easy to implement but we'll have to change most of the run_[bionet|pointnet|filternet].py examples
Many examples under
examples/
use the following line to set the 'default' config file.if __file__ != sys.argv[-1]:
However, in Python 3.9+, this won't work because
__file__
is an absolute path.An easy way to fix it will be using something like:
if sys.argv[-1] in __file__:
Or, alternatively, we can change
__file__
toos.path.basename(__file__)
.There might be a better idea, so making an issue to discuss.
The text was updated successfully, but these errors were encountered: