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
Describe the bug
When using ScriptRunner to generate the client portion of a job, passing a string with curly brackets ({}) to script_args causes a crash. For example, if a parameter is a JSON-compatible string like "--param1={'A':1, 'B':2}" and job.simulator_run() is called, the execution fails at this line.
It appears that NVFlare interprets curly brackets as placeholders for variable substitution, even when the string should be passed as-is.
To Reproduce
A quick and dirty way to reproduce the issue is by modifying one of the example scripts, such as hello-pt.
Set script_args to a string containing curly brackets, e.g., "--data_path {}".
Run the job.
Expected behavior
The run should crash. One of the lines on the log.txt should be an error message similar to:
nvflare.fuel.common.excepts.ConfigError: Error processing '/tmp/nvflare/jobs/workdir/site-2/simulate_job/app_site-2/config/config_fed_client.json' in element '"--data_path {}"': path: 'executors.#1.executor.args.task_script_args', exception: 'IndexError: Replacement index 0 out of range for positional args tuple'
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Ubuntu 22.04, macOS
Python Version: 3.10.16
NVFlare Version: 2.5.2
The text was updated successfully, but these errors were encountered:
Describe the bug
When using ScriptRunner to generate the client portion of a job, passing a string with curly brackets ({}) to script_args causes a crash. For example, if a parameter is a JSON-compatible string like "--param1={'A':1, 'B':2}" and job.simulator_run() is called, the execution fails at this line.
It appears that NVFlare interprets curly brackets as placeholders for variable substitution, even when the string should be passed as-is.
To Reproduce
A quick and dirty way to reproduce the issue is by modifying one of the example scripts, such as hello-pt.
Set script_args to a string containing curly brackets, e.g., "--data_path {}".
Run the job.
Expected behavior
The run should crash. One of the lines on the log.txt should be an error message similar to:
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: