Skip to main content

Manage Workspaces

Check your docs version

This version of the Anyscale docs is deprecated. Go to the latest version for up to date information.

Create a Workspace

Follow these steps to start experimentation or development with workspaces.

  1. Log in to the Anyscale Console.

  2. Go to the "Workspaces" tab on the left navigation bar.

    workspace-panel
  3. Create a new Workspace by clicking on the "+ Create" button.

    create-workspace
  4. Configure the Workspace based on your needs

  • Name Provide a name for you Workspace
  • Compute_config A compute config used for the underlying cluster.
  • Cluster environments A cluster environment used for the underlying clus*ter.
  • Auto-suspend / Idle Termination The Workspace will automatically shut down the underlying cluster if no value is provided.

Start a Workspace

Open the detail page of a Workspace and click "Start" button in the top toolbar. start-cluster

Terminate a Workspace

Open the detail page of a Workspace and click "Terminate" to manually terminate it. Additionally, you can configure Anyscale to automatically terminate a Workspace via idle termination.

Idle Termination

If Idle Termination is enabled for a Workspace, Anyscale will automatically terminate the Workspace when it has been idle for a given amount of time. An idle Workspace is a Workspace with no activities. Idle time begins counting immediately after the last activity in a Workspace (or its underlying Cluster).

The following actions count as activities:

  • A running Ray Job is treated as ongoing activity for its entire duration.
    • Note that the Ray Job must attach a Ray Driver (by calling ray.init()) to count as activity.
    • Attaching a Ray Driver, even if it does nothing, is a good trick for keeping a Workspace active if you need to keep the Workspace active for something that does not otherwise count as activity.
  • Starting or updating the Workspace (or the underlying Cluster).
    • Updating a Workspace refers to when a Workspace restarts in order to fulfill new configuration options.
  • Completing or canceling a command submitted through the Web Terminal of the Anyscale Workspace page or the Anyscale API/SDK. Note that a command does not count as activity when it is submitted, only when it finishes.
  • Making a change to the filesystem of an Anyscale Workspace.
    • A change made by code running in the Workspace will only count as activity if it causes a new Workspace snapshot. In other words, the change must be made to a file that is not git ignored.

The following actions DO NOT count as activities (provided they do not attach a Ray Driver as a side effect):

  • Submitting a Ray Job through the Ray Jobs API if the submitted Job script never calls ray.init().
  • Running a command in a terminal in Visual Studio Code or Jupyter.
  • Running a JupyterLab notebook.

Note that a Ray Job started in a JupyterLab notebook via ray.init() will continue to run indefinitely (and keep the Workspace active) unless it is explicitly stopped via ray.shutdown(). This is because the python kernel in a Jupyter notebook does not trigger the typical atexit hook for ray.shutdown() when a block of code finishes.

Edit a Workspace

On the Workspace page, open the "Workspace" menu in the top toolbar and click "Edit" to modify the configurations of the Workspace.

info

Some of the configurations can only be modified when the Workspace is terminated.

Delete a Workspace

Open the "Workspace" menu in the top toolbar and click "Delete".

info

You can only delete terminated Workspaces.

Duplicate a Workspace

Open the "Workspace" menu in the top toolbar and click "Duplicate" button. The following will be duplicated to the new Workspace:

The following will NOT be duplicated: