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

Wrong file name in error message for invalid initialization_script in NotebookJobStep #4855

Open
fakio opened this issue Aug 29, 2024 · 0 comments
Labels

Comments

@fakio
Copy link

fakio commented Aug 29, 2024

Describe the bug
If you use an initialization_script that doesn't exist in NotebookJobStep you receive an error message that informs the input notebook name instead of the initialization_script name.

The error seems at https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/workflow/notebook_job_step.py#L267

To reproduce

steps = [NotebookJobStep(
    image_uri="885854791233.dkr.ecr.us-east-1.amazonaws.com/sagemaker-distribution-prod:1-cpu",
    kernel_name="python3",
    input_notebook="job-test/job.ipynb",
    initialization_script="invalid-file.sh",
)]
pipeline = Pipeline(
    name="pipeline",
    steps=steps,
)
pipeline.upsert(role_arn=role)

Expected behavior
ValueError: Validation Errors:

  • The initialization script(invalid-file.sh) is not a valid file.

Screenshots or logs
ValueError: Validation Errors:

  • The initialization script(job-test/job.ipynb) is not a valid file.
@fakio fakio added the bug label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant