Skip to main content

Manage Your Compute

Edit and delete deployments, nodepools, and clusters


You can efficiently manage your deployments, nodepools, and clusters within the Clarifai's platform to optimize performance and costs, as well as fine-tune your compute environment for tasks like model inference.

You can easily edit configurations, adjust resource allocations, or remove unused resources to free up compute infrastructure as your workload requirements evolve.

Via the UI

Deployments

You can manage various aspects of your deployments by visiting the nodepool viewer page. The Deployments table displays all your current deployments within that nodepool, along with their associated models and deployed model versions.

The table also supports sorting, allowing you to organize entries alphabetically (A–Z or Z–A) as needed.

To manage a specific deployment, locate it in the table and click the three-dot menu at the end of its row. This reveals a list of available actions, such as editing, viewing logs, opening the model in the Playground, or deleting the deployment.

Copy Deployment ID

To copy a deployment ID, navigate to the Deployments table and locate the ID column. Find the ID you need, then click to copy it to your clipboard.

Open in Playground

To open a model in the Playground and test its performance, go to the Deployments table and click the three-dot menu at the end of the corresponding row. From the pop-up that appears, select Open in Playground.

View Deployment Logs

You can access deployment logs to monitor performance and troubleshoot issues.

To view the logs, locate the desired deployment in the Deployments table, click the three-dot menu at the end of its row, and select the View Logs option from the pop-up that appears.

A preview window will open, displaying a summary of the log file. To view a full version of the deployment logs, click the Download button.

Edit a Deployment

To edit a deployment, navigate to the Deployments table and click the three-dot menu at the end of the corresponding row, as described previously.

Then, select the Deployment Setup option from the pop-up that appears.

You’ll be redirected to the deployment configuration page, where you can review and modify the model deployment settings as needed.

Delete a Deployment

To delete a deployment, navigate to the Deployments table and click the three-dot menu at the end of the corresponding row, as described previously.

Then, select the Delete Deployment option from the pop-up that appears.

A confirmation dialog will appear, warning you that this is a destructive action and cannot be undone. To complete the deletion, enter the name of the deployment in the provided field, then click Yes, Delete.

View Deployment Details

You can view deployment details directly from the Deployments table. Once you've located the desired deployment, hover over the CONFIG column (represented by the clipboard icon) in the same row.

A quick-access tooltip will appear, showing the autoscaling configuration for that deployment.

Alternatively

You can view a model’s deployment details by navigating to its individual page, selecting the Activity tab, and reviewing the Active Deployments section. You can find information about the compute environments where the model is currently running.

Also, clicking the three-dot menu at the end of the row in the table reveals different options that allow you to edit the deployment, copy the deployment ID, open the model in the Playground, view deployment logs, or delete the deployment.

Nodepools

Edit a Nodepool

To edit a nodepool, go to its individual page and click the Edit Nodepool button located in the upper-right corner of the screen.

You'll be redirected to a page where you can modify the configurations for your nodepool based on your requirements.

Alternatively

You can perform various nodepool management tasks from the cluster viewer page. In the Nodepools table, locate the nodepool you want to manage, then click the three-dot menu at the end of the row.

The pop-up that appears provides options to edit the nodepool, deploy a model to it, copy its ID, or delete the nodepool.

Delete a Nodepool

To delete a nodepool, go to its individual page and click the three-dot menu in the upper-right corner of the screen.

Then, click the Delete Nodepool button that appears.

A confirmation pop-up will appear, warning you that deleting the nodepool will cause the associated deployments to stop functioning. So, you may reassign the deployments to a different nodepool if you want to continue using them.

Note that since this action cannot be undone, you need to proceed with caution.

To complete the deletion, enter the name of the nodepool in the provided field, then click Yes, Delete.

Clusters

Delete a Cluster

To delete a cluster, go to its individual page and click the three-dot menu in the upper-right corner of the screen.

Then, click the Delete Cluster button that appears.

A confirmation pop-up will appear, warning you that deleting the cluster will cause the associated nodepools to stop functioning. So, you may reassign the nodepools to a different cluster if you want to continue using them.

Note that since this action cannot be undone, you need to proceed with caution.

To complete the deletion, enter the name of the cluster in the provided field, then click Yes, Delete.

Via the API

Clusters

Get a Cluster

To get a specific compute cluster, pass the compute_cluster_id to the compute_cluster method of the User class.

from clarifai.client.user import User
import os

# Set the PAT key
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

# Initialize the client
client = User(
user_id="YOUR_USER_ID_HERE",
base_url="https://api.clarifai.com"
)

# Get and print the compute cluster
compute_cluster = client.compute_cluster(
compute_cluster_id="test-compute-cluster"
)
print(compute_cluster)

List All Clusters

To list your existing compute clusters, call the list_compute_clusters method of the User class.

from clarifai.client.user import User
import os

# Set the PAT key
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

# Initialize the client
client = User(
user_id="YOUR_USER_ID_HERE",
base_url="https://api.clarifai.com"
)

# Get and print all the compute clusters
all_compute_clusters = list(
client.list_compute_clusters()
)
print(all_compute_clusters)

Nodepools

Get a Nodepool

To get a specific nodepool, provide the nodepool_id to the nodepool method of the ComputeCluster class.

from clarifai.client.compute_cluster import ComputeCluster
import os

# Set the PAT key
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

# Initialize the ComputeCluster instance
compute_cluster = ComputeCluster(
user_id="YOUR_USER_ID_HERE",
compute_cluster_id="test-compute-cluster",
base_url="https://api.clarifai.com"
)

# Get and print the nodepool
nodepool = compute_cluster.nodepool(
nodepool_id="test-nodepool"
)
print(nodepool)

List All Nodepools

To list the existing nodepools, call the list_nodepools method of the ComputeCluster class.

from clarifai.client.compute_cluster import ComputeCluster
import os

# Set the PAT key
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

# Initialize the ComputeCluster instance
compute_cluster = ComputeCluster(
user_id="YOUR_USER_ID_HERE",
compute_cluster_id="test-compute-cluster",
base_url="https://api.clarifai.com"
)

# Get and print all the nodepools
all_nodepools = list(
compute_cluster.list_nodepools()
)
print(all_nodepools)

Deployments

Get a Deployment

To get a specific deployment, provide the deployment_id to the deployment method of the Nodepool class.

from clarifai.client.nodepool import Nodepool
import os

# Set the PAT key
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

# Initialize the Nodepool instance
nodepool = Nodepool(
user_id="YOUR_USER_ID_HERE",
nodepool_id="test-nodepool",
base_url="https://api.clarifai.com"
)

## Get and print the deployment
deployment = nodepool.deployment(
deployment_id="test-deployment"
)
print(deployment)

List All Deployments

To list existing deployments, call the list_deployments method of the Nodepool class.

from clarifai.client.nodepool import Nodepool
import os

# Set the PAT key
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

# Initialize the Nodepool instance
nodepool = Nodepool(
user_id="YOUR_USER_ID_HERE",
nodepool_id="test-nodepool",
base_url="https://api.clarifai.com"
)

# Get and print all the deployments
all_deployments = list(
nodepool.list_deployments()
)
print(all_deployments)

Delete Resources

Delete Deployments

To delete deployments, pass a list of deployment IDs to the delete_deployments method of the Nodepool class.

from clarifai.client.nodepool import Nodepool
import os

# Set the PAT key
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

# Initialize the Nodepool instance
nodepool = Nodepool(
user_id="YOUR_USER_ID_HERE",
nodepool_id="test-nodepool",
base_url="https://api.clarifai.com"
)

# Get all the deployments in the nodepool
all_deployments = list(nodepool.list_deployments())

# Extract deployment IDs for deletion
deployment_ids = [deployment.id for deployment in all_deployments]

# Delete a specific deployment by providing its deployment ID
# deployment_ids = ["test-deployment"]

# Delete the deployments
nodepool.delete_deployments(deployment_ids=deployment_ids)

Delete Nodepools

To delete nodepools, provide a list of nodepool IDs to the delete_nodepools method of the ComputeCluster class.

from clarifai.client.compute_cluster import ComputeCluster
import os

# Set the PAT key
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

# Initialize the ComputeCluster instance
compute_cluster = ComputeCluster(
user_id="YOUR_USER_ID_HERE",
compute_cluster_id="test-compute-cluster",
base_url="https://api.clarifai.com"
)

# Get all nodepools within the compute cluster
all_nodepools = list(compute_cluster.list_nodepools())

# Extract nodepool IDs for deletion
nodepool_ids = [nodepool.id for nodepool in all_nodepools]

# Delete a specific nodepool by providing its ID
# nodepool_ids = ["test-nodepool"]

# Delete the nodepools
compute_cluster.delete_nodepools(nodepool_ids=nodepool_ids)

Delete Compute Clusters

To delete compute clusters, provide a list of compute cluster IDs to the delete_compute_clusters method of the User class.

from clarifai.client.user import User
import os

# Set the PAT key
os.environ["CLARIFAI_PAT"] = "YOUR_PAT_HERE"

# Initialize the User client
client = User(
user_id="YOUR_USER_ID_HERE",
base_url="https://api.clarifai.com"
)

# Get all compute clusters associated with the user
all_compute_clusters = list(client.list_compute_clusters())

# Extract compute cluster IDs for deletion
compute_cluster_ids = [compute_cluster.id for compute_cluster in all_compute_clusters]

# Delete a specific nodepool by providing its ID
# compute_cluster_ids = ["test-compute-cluster"]

# Delete the compute clusters
client.delete_compute_clusters(compute_cluster_ids=compute_cluster_ids)