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

add quotation marks to --wrap for sbatch #182

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Conversation

JackTemaki
Copy link
Contributor

@JackTemaki JackTemaki commented Mar 4, 2024

For some reason calling sbatch would interpret the --wrap string differently for one of my new setups.

sbatch [...] --wrap=apptainer exec --nv --bind /work/asr4 /work/asr4/rossenbach/rescale/pytorch_mixed_precision/apptainer/u22_pytorch2.1_onnx_flashlight_0224_jaist_project.sif sis worker --engine long work/i6_core/returnn/forward/ReturnnForwardJobV2.xT8obDvtAg1w run
[2024-03-04 10:16:31,705] ERROR: Error: sbatch: error: Script arguments not permitted with --wrap option

I added quotation marks solving this issue.

Copy link
Member

@albertz albertz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder what aspect is actually interpreting this. Is this some subshell by sbatch? Or some custom code by sbatch? Or something else?

There is also shlex.quote, to escape a string for (POSIX) shells. Using the quoting here could break if there are other quotes in the call.

But as we don't really know, and this problem might be unlikely, I think this solution here is good enough.

@JackTemaki JackTemaki merged commit 73f648d into master Mar 4, 2024
3 checks passed
@albertz
Copy link
Member

albertz commented Mar 4, 2024

I think we need to revert this. Now all my jobs crash with this error:

--------------------- Slurm Task Prolog ------------------------
/var/spool/slurm/slurmd/job5393565/slurm_script: 4:
/work/tools/users/zeyer/py-envs/py3.11-torch2.1/bin/python3.11 ./sis
worker --engine long
work/i6_core/returnn/forward/ReturnnForwardJobV2.CJwh9MSDhDIk run: not
found
--------------------- Slurm Task Epilog ------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants