With Code Workspaces, users can securely connect to existing internal systems and build analyses, models, dashboards, or entire workflows on data with Foundry’s access controls and data permissioning.
Code workspaces spin up dedicated Foundry computation modules for execution, which utilizes Foundry compute-seconds while in use.
Live workspace utilization metrics are available for CPU, memory and disk usage. To view these metrics, expand the Workspace utilization section of the Settings side panel.
When a Code Workspace is opened, Foundry will launch a dedicated compute session for the workspace. The session's status is STARTING
until the session is available, becomes INITIALIZING
, and then RUNNING
. When the user manually stops the session, or when no user interaction is detected for longer than the auto-shutdown timeout, the session will become STOPPING
and then IDLE
. Foundry compute seconds are only used when the session is INITIALIZING
or RUNNING
.
All the possible states for a workspace are listed below. The states when the code workspace uses compute are indicated with right arrows (→).
STARTING
: a new session was requestedINITIALIZING
: the session is available and is being configRUNNING
: the session is available and usableSTOPPING
: the session is stoppingIDLE
: the session is stoppedFAILED
: an error occurredTERMINATING
: the session is being deleted permanentlyNOT STARTED
: no session available for this workspaceCode Workspaces measure compute seconds in the same manner as other scaling compute in the platform. Review the general Foundry Compute documentation for a description of how it is measured.
Foundry Code Workspaces attribute all associated compute to the workspace resource in the filesystem. You can always view the usage of all sessions in the Resource Management Application.
The compute usage of a Code Workspace session is directly proportional to the dedicated computational resources available to session and the length of the session.
To manage the hardware size of your session, go to Settings > Compute Resources. You can choose from a variety of different session sizes. Refer to the screenshot below for an indication of how you can choose sizes and optionally allocate GPUs to your workspace. The resource queue in the project containing your workspace determines available GPUs. Learn more about using GPUs in projects.
Long-running sessions utilize more compute than short-running sessions. Be sure to tune your auto-shutdown time to be consistent with your working style to not use more compute than necessary. You should manually stop sessions when you know you are done.
This example demonstrates how Foundry compute is measured for a medium Foundry Code Workspace session that runs for 10 minutes (600 seconds).
The Compute Resource profiles available in Code Workspaces optimize the CPU-to-memory ratio, for instance the medium profile (2 CPUs) will request 15 GB.
Compute Session Size: Medium
vCPUs: 2
GiB_RAM: 15
Runtime: 600 seconds
Calculation
compute_seconds = max(num_vcpu, GiB_RAM/7.5) * num_seconds
= 1200 compute-seconds