Skip to content

Instantly share code, notes, and snippets.

@ismaelc
Created March 5, 2023 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ismaelc/50853a8de1e6925de408c4a821004269 to your computer and use it in GitHub Desktop.
Save ismaelc/50853a8de1e6925de408c4a821004269 to your computer and use it in GitHub Desktop.
Send bootstrap script to pull ipynb via FrameworkProcessor
from sagemaker.processing import ProcessingInput, ProcessingOutput
script_processor.framework_entrypoint_command = ['python3']
script_processor.run(
job_name=job_name,
code=f"{base_url}/processing_job/code/run_notebook-{random_string}.py",
source_dir=f"{base_url}/processing_job/code",
inputs=[
ProcessingInput(
source=s3_notebook_path,
destination="/opt/ml/processing/input"
)
],
outputs=[
ProcessingOutput(
output_name="output_notebook",
source="/opt/ml/processing/output",
destination=f"{base_url}/notebook_outputs",
)
],
wait=True,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment