Skip to content

Instantly share code, notes, and snippets.

@crypdick
Created June 16, 2025 18:40
Show Gist options
  • Save crypdick/4e63ecaf7c4dba952a7d5bd34a6a685d to your computer and use it in GitHub Desktop.
Save crypdick/4e63ecaf7c4dba952a7d5bd34a6a685d to your computer and use it in GitHub Desktop.
job completes successfully, but cell throws a CalledProcessError
{
"name": "CalledProcessError",
"message": "Command 'b'\
# Production batch job -- note that this is a bash cell\
! anyscale job submit --name=train-xboost-breast-cancer-model \\\\\
--containerfile=\"${WORKING_DIR}/containerfile\" \\\\\
--working-dir=\"${WORKING_DIR}\" \\\\\
--exclude=\"\" \\\\\
--wait \\\\\
--max-retries=0 \\\\\
-- cd notebooks && jupyter nbconvert --to script 01-Distributed_Training.ipynb && ipython 01-Distributed_Training.py\
'' returned non-zero exit status 1.",
"stack": "---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
/home/ray/default/notebooks/01-Distributed_Training.ipynb Cell 40 line 1
----> <a href='vscode-notebook-cell://vscode-session-fla14u4c61e72uisribxdpbnvj.i.anyscaleuserdata-staging.com/home/ray/default/notebooks/01-Distributed_Training.ipynb#X54sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0'>1</a> get_ipython().run_cell_magic('bash', '', '\
# Production batch job -- note that this is a bash cell\
! anyscale job submit --name=train-xboost-breast-cancer-model \\\\\
--containerfile=\"${WORKING_DIR}/containerfile\" \\\\\
--working-dir=\"${WORKING_DIR}\" \\\\\
--exclude=\"\" \\\\\
--wait \\\\\
--max-retries=0 \\\\\
-- cd notebooks && jupyter nbconvert --to script 01-Distributed_Training.ipynb && ipython 01-Distributed_Training.py\
')
File ~/anaconda3/lib/python3.12/site-packages/IPython/core/interactiveshell.py:2478, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2476 with self.builtin_trap:
2477 args = (magic_arg_s, cell)
-> 2478 result = fn(*args, **kwargs)
2480 # The code below prevents the output from being displayed
2481 # when using magics with decodator @output_can_be_silenced
2482 # when the last Python token in the expression is a ';'.
2483 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~/anaconda3/lib/python3.12/site-packages/IPython/core/magics/script.py:153, in ScriptMagics._make_script_magic.<locals>.named_script_magic(line, cell)
151 else:
152 line = script
--> 153 return self.shebang(line, cell)
File ~/anaconda3/lib/python3.12/site-packages/IPython/core/magics/script.py:305, in ScriptMagics.shebang(self, line, cell)
300 if args.raise_error and p.returncode != 0:
301 # If we get here and p.returncode is still None, we must have
302 # killed it but not yet seen its return code. We don't wait for it,
303 # in case it's stuck in uninterruptible sleep. -9 = SIGKILL
304 rc = p.returncode or -9
--> 305 raise CalledProcessError(rc, cell)
CalledProcessError: Command 'b'\
# Production batch job -- note that this is a bash cell\
! anyscale job submit --name=train-xboost-breast-cancer-model \\\\\
--containerfile=\"${WORKING_DIR}/containerfile\" \\\\\
--working-dir=\"${WORKING_DIR}\" \\\\\
--exclude=\"\" \\\\\
--wait \\\\\
--max-retries=0 \\\\\
-- cd notebooks && jupyter nbconvert --to script 01-Distributed_Training.ipynb && ipython 01-Distributed_Training.py\
'' returned non-zero exit status 1."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment