Skip to main content

Lifecyle

You can easily access and consume Runtimes from various interfaces, including JupyterLab, the CLI or VS Code.

info

Read below to learn more about the available Runtime Actions.

  • Launch.
  • List.
  • Assign.
  • Execute Code.
  • Interrupt.
  • Restart.
  • Pause.
  • Resume.
  • Transfer State.
  • Terminate.

Launch a Runtime

Launching a Runtime is the first step to unlock the power of Datalayer.

You can launch Runtimes from the "Runtimes" tab.

You will be prompted to select a few options:

  • An Environment, this can be a Platform or a User Environment.

  • For Runtime, a Time Reservation that defines the maximum execution time for the Runtime. After this time, the Runtime will be automatically terminated to prevent overconsumption of Credits.

  • You can choose whether the Runtime will have access to persistent persistent storage, allowing data to be retained between Runtime Sessions. Note that Runtimes with persistent storage may take longer to start (approximately 15 seconds instead of 3 seconds). Persistent storage is available under the ~/persistent directory on the Runtime.

  • You can also open an example Notebook when the Runtime starts. This feature provides a ready-to-use notebook, helping you quickly familiarize yourself with the environment and start working right away.

List the Runtimes

You can view the list of running Runtimes in the "Runtimes" tab.

Assign a Runtime

Once your Runtime is up and running, you can assign it to a Notebook or a specific cell.

Assign a Runtime to a Notebook

warning

🚧 SaaS is Work in Progress

Assign a Runtime to a Cell

Datalayer allows you to selectively run specific Notebook cells on Runtime. This hybrid approach optimizes both performance and cost by using Remote resources only when necessary.

Learn more about this feature in our Blog Post.

warning

🚧 SaaS is Work in Progress

Execute Code

Execute a Notebook

warning

🚧 SaaS is Work in Progress

Execute a File

warning

🚧 SaaS is Work in Progress

Execute Code in a Console

warning

🚧 SaaS is Work in Progress

Interrupt a Runtime

You can interrupt a Runtime by clicking the Interrupt icon. This action will stop the Runtime's current execution.

This is useful when you want to stop a long-running computation or if the Runtime is unresponsive.

Restart a Runtime

You can restart a Runtime by clicking the Restart icon. This action will restart the Runtime, clearing all variables and outputs.

This is useful when you want to start fresh without creating a new Runtime.

Pause a Runtime

You can pause a Runtime by clicking the Pause icon. This action will pause the Runtime, allowing you to resume it later. This is useful when you want to temporarily stop the Runtime, keep its state, and resume it later.

With this feature, you can save credits by pausing the Runtime when you are not actively using it and resuming it when needed without having to rerun all the code that was needed to reach the current state.

note

When a Runtime is paused, a Runtime Snapshot is created.

warning

There are a few limitations to be aware of:

  1. Object Size Limitations: Extremely large objects, such as massive datasets or memory-heavy models, may exceed persistence limits. Consider external storage options, like cloud storage or databases, for these cases.
  2. Picklable Objects Only: The Runtime state is serialized using Python's pickle module. While common types (e.g., lists, dictionaries, NumPy arrays) are compatible, some objects (e.g., open file handles, certain class instances) may not be. Review the types of objects in your notebook to ensure compatibility.

Resume a Runtime

To Resume a Runtime, click the Resume icon of the Snapshot.

Snapshot management

You can see the pause and resume feature in action below.

For details on snapshots features, see Snapshots.

Transfer a Runtime State

When you switch to a Runtime, you have the option to transfer the variables from the current Runtime to the new one.

This feature is useful when you want to keep the state of your variables when switching Runtimes. This allows to save time and resources by avoiding re-running the code to reach the current state.

warning

🚧 SaaS is Work in Progress

warning

Variable transfers are currently limited to 7 MB. If you have large variables, consider saving them in the persistent storage. For more information, see Persistent Storage. Additionally, only pickable objects can be transferred.

You can also transfer variables between cells running on different Runtimes. This feature is particularly useful when you want to use variables you defined in previous cells.

warning

🚧 SaaS is Work in Progress

Terminate a Runtime

You can terminate a Runtime by clicking the trash icon. This action will terminate the Runtime and remove it from the list of running Runtimes. This is useful when a Runtimes is no longer needed.

tip

This will stop the credits consumption for this Runtime.