"ts/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "69a84cf3c5b73053bcbfae59e966e0205a3ee727"
Unverified Commit 56da3c39 authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Fix a bug in retiarii (#4052)

parent 0fe0fd86
...@@ -43,7 +43,7 @@ def get_module_name(cls_or_func): ...@@ -43,7 +43,7 @@ def get_module_name(cls_or_func):
if inspect.getmodule(frm[0]).__name__ == '__main__': if inspect.getmodule(frm[0]).__name__ == '__main__':
# main module found # main module found
main_file_path = Path(inspect.getsourcefile(frm[0])) main_file_path = Path(inspect.getsourcefile(frm[0]))
if main_file_path.parents[0] != Path('.'): if not Path().samefile(main_file_path.parent):
raise RuntimeError(f'You are using "{main_file_path}" to launch your experiment, ' raise RuntimeError(f'You are using "{main_file_path}" to launch your experiment, '
f'please launch the experiment under the directory where "{main_file_path.name}" is located.') f'please launch the experiment under the directory where "{main_file_path.name}" is located.')
module_name = main_file_path.stem module_name = main_file_path.stem
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment