Skip to main content

Lifecyle

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

info

Read below to learn more about the available Kernel Actions.

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

Launch a Kernel

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

You can launch Kernels from the "Kernels" tab.

Kernels interface

You will be prompted to select a few options:

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

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

  • You can choose whether the Kernel will have access to persistent persistent storage, allowing data to be retained between Kernel Sessions. Note that Kernels 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 Remote Kernel.

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

List the Kernels

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

Kernel management

Assign a Kernel

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

Assign a Kernel to a Notebook

warning

🚧 SaaS is Work in Progress

Assign a Kernel to a Cell

Datalayer allows you to selectively run specific Notebook cells on Remote Kernels. 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 Kernel

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

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

Kernel management

Restart a Kernel

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

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

Kernel management

Pause a Kernel

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

With this feature, you can save credits by pausing the Kernel 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 Kernel is paused, a Kernel 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 Kernel 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 Kernel

To Resume a Kernel, 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 Kernel State

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

This feature is useful when you want to keep the state of your variables when switching kernels. 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 kernels. This feature is particularly useful when you want to use variables you defined in previous cells.

warning

🚧 SaaS is Work in Progress

Terminate a Kernel

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

tip

This will stop the credits consumption for this Kernel.