내용으로 건너뛰기

SageMaker Studio > Code Editor or Jupyter Notebook > running scheduled scripts

0

In SageMaker Studio, you have to 'run' the Code Editor for it to open. I'm wondering if code that is set to run automatically can still execute even if the Code Editor hasn't been manually opened.

Specifically, I’d like to schedule a script (e.g., for web crawling) to run automatically at certain times within the Code Editor. Is this possible?

질문됨 일 년 전213회 조회

1개 답변
0

Yes, you can schedule scripts to run automatically in SageMaker without having to manually open the Code Editor or Jupyter Notebook. This is possible through SageMaker notebook jobs.

SageMaker notebook jobs allow you to create non-interactive jobs that run either on demand or on a schedule. When you set up a notebook job, SageMaker takes a snapshot of your entire notebook, packages its dependencies in a container, builds the necessary infrastructure, runs the notebook as an automated job based on your schedule, and then deprovisions the infrastructure when the job completes.

You have several options to schedule your notebook jobs:

  1. Using the Notebook Jobs widget directly from JupyterLab with an intuitive user interface
  2. Using the SageMaker Python SDK

For your web crawling use case, you could create a notebook containing your web crawling code and schedule it to run at specific times. The notebook will execute automatically according to your schedule without requiring you to manually open the Code Editor.

You can schedule a job in different ways:

  • For a one-time future run at a specific date and time
  • For recurring runs using cron expressions (e.g., running at 10:15am UTC on the last Friday of each month)

After setting up your scheduled notebook job, you can monitor its execution through the SageMaker Notebook Jobs dashboard in the Studio UI.
Sources
ML Compute Instance with Jupyter Notebook - Amazon SageMaker Studio Notebooks - AWS
Machine Learning Service – Amazon SageMaker Studio Notebooks – AWS
Create notebook job with SageMaker AI Python SDK example - Amazon SageMaker AI
Schedule your ML workflows - Amazon SageMaker AI

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠