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

allow absolute path for the external script #2565

Merged
merged 9 commits into from
Jun 6, 2024
3 changes: 3 additions & 0 deletions nvflare/job_config/base_app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def add_ext_script(self, ext_script: str):
if not os.path.exists(ext_script):
raise RuntimeError(f"Could not locate external script: {ext_script}")

if os.path.isabs(ext_script):
yhwen marked this conversation as resolved.
Show resolved Hide resolved
raise RuntimeError(f"External script: {ext_script} can not be absolute path.")

if not ext_script.endswith(".py"):
raise RuntimeError(f"External script: {ext_script} must be a '.py' file.")

Expand Down
Loading