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

Can we raise a more informative error when papermill is not installed? #8

Closed
krassowski opened this issue Apr 10, 2024 · 2 comments · Fixed by #10
Closed

Can we raise a more informative error when papermill is not installed? #8

krassowski opened this issue Apr 10, 2024 · 2 comments · Fixed by #10
Assignees
Labels
area: user experience 👩🏻‍💻 needs: review 👀 This PR is complete and ready for reviewing status: in review 👀 This PR is currently being reviewed by the team type: enhancement 💅🏼 New feature or request

Comments

@krassowski
Copy link
Member

Context

When papermill is not in environment the job fails without any sensible description. There are some ideas to solve it with LBYL (nebari-dev/nebari#1838):

def gen_conda_env_path(conda_env_name: str, use_conda_store_env: bool = True):
# TODO: validate that `papermill` is in the specified conda environment

but I think what would be neat is if we could return an informative error from the container itself:

currently it just shows "Workflow failed"

image

Maybe it is as simple as adjusting these lines:

papermill = f"papermill -k {kernel_name} {input_path} {output_path}"
jupyter = f"jupyter nbconvert --to html {output_path} --output {html_path}"
return f'conda run -p {conda_env_path} /bin/sh -c "{{ {papermill} && {jupyter} ; }} >> {log_path} 2>&1"'

?

Value and/or benefit

Less user confusion. Users using the scheduler function rather than giving up after first attempt because it is not working.

Anything else?

No response

@krassowski krassowski added the needs: triage 🚦 Someone needs to have a look at this issue and triage label Apr 10, 2024
@Adam-D-Lewis
Copy link
Member

Definitely agree with this 👍

@nkaretnikov nkaretnikov self-assigned this May 14, 2024
nkaretnikov added a commit to nkaretnikov/argo-jupyter-scheduler that referenced this issue May 15, 2024
@nkaretnikov nkaretnikov added area: user experience 👩🏻‍💻 needs: review 👀 This PR is complete and ready for reviewing status: in review 👀 This PR is currently being reviewed by the team type: enhancement 💅🏼 New feature or request and removed needs: triage 🚦 Someone needs to have a look at this issue and triage labels May 19, 2024
@nkaretnikov
Copy link
Collaborator

I've implemented this in #10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: user experience 👩🏻‍💻 needs: review 👀 This PR is complete and ready for reviewing status: in review 👀 This PR is currently being reviewed by the team type: enhancement 💅🏼 New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants