Write Endpoints
Note that access to the Comet REST endpoints require the {'Authorization': ${COMET_API_KEY}}
header. You can find your API key in your account settings or by navigating to https://www.comet.com/api/my/settings/.
Create Workspace¶
Create a new workspace
Example Request
{
"name: required": "someName",
"plan: optional": "PLAN"
}
Example Response
{
"msg": "saved",
"workspace_name": "new-workspace-name",
"workspace_id": "fa2c4010-017f-4c9c-9121-98e8cb0b1e65",
"code": 200
}
Create Experiment¶
Create an experiment.
Example Request
{
"workspaceName: required": "someTeamName",
"projectName: required": "someProjectName",
"experimentName, optional": "someExperimentName"
}
Example Response
{
"experimentKey": "someExperimentKey",
"workspaceName": "someTeamName",
"projectName": "someProjectName",
"link": "link to experiment"
}
Stop Experiment¶
Stop an experiment.
Example Response
{
"msg": "Stop Requested"
}
Archive Experiment¶
Archive an experiment.
Example Response
{
"msg": "Archived"
}
Move an Experiment to another Project¶
Move (or symlink) an experiment to another project.
Example Request
{
"targetWorkspaceName: required": "TARGET_WORKSPACE",
"targetProjectName: required": "TARGET_PROJECT_NAME",
"experimentKeys: required": "[THE_KEY,ANOTHER_KEY]",
"symlink: required": true
}
Example Response
"[response]"
Add Symlink to Experiment¶
Add a symlink to an experiment.
Example Response
{
"link": "symlink to experiment under the new project"
}
Delete Experiment¶
Delete an experiment.
Example Response
{
"msg": "Deleted"
}
Restore Experiment¶
Restore an experiment.
Example Response
{
"msg": "Restore"
}
Create Project¶
Create a project.
Example Request
{
"workspaceName: required": "someTeamName",
"projectName: required": "someProjectName",
"projectDescription: required": "someProjectDescription",
"isPublic: required": "[Boolean for whether the new project should be public]"
}
Example Response
{
"projectId": "someProjectId"
}
Delete Project¶
Delete a project.
Example Request
{
"workspaceName: required": "someTeamName",
"projectName: required": "someProjectName",
"deleteAllExperiments: required": "[Boolean for whether to also delete all the experiments in the project]"
}
Example Response
{
"msg": "Deleted"
}
Update Project¶
Update a project's metadata. Either projectId should be non null, Or both projectName and workspaceName should be non null. They should not all be null or all be non null
Example Request
{
"projectId": "someProjectId",
"projectName": "someProjectName",
"workspaceName": "someTeamName",
"newProjectName: optional": "someProjectDescription",
"newProjectDescription: optional": "someProjectDescription",
"isPublic: optional": "[Boolean for whether the new project should be public]"
}
Example Response
{
"msg": "Updated"
}
Update notes for Project¶
Update the notes for a project.
Example Request
{
"projectId: required": "someProjectId",
"notes: required": "someNotesString"
}
Example Response
{
"msg": "Saved"
}
Add a Project Share Link¶
Add a share-link to a project
Example Response
{
"shareCode": "the-code"
}
Delete a Project Share Link¶
Delete an existing share-link
Example Response
"[response]"
Create Registry Model¶
Create a new Registry Model.
Example Request
{
"experimentModelId": "someExperimentModelId",
"registryModelName": "someRegistryModelName",
"description": "Some Description",
"isPublic": "[Boolean]",
"version": "someVersion",
"comment": "Some Comment",
"stages": [
"production",
"staging"
]
}
Example Response
{
"registryModelId": "someRegistryModelId",
"registryModelItemId": "someRegistryModelItemId"
}
Promote Experiment Model to Registry Model¶
Promote a model from an experiment to a Registry Model as a new version.
Example Request
{
"experimentModelId": "someExperimentModelId",
"registryModelName": "someRegistryModelName",
"version": "someVersion",
"comment": "Some Comment",
"stages": [
"production",
"staging"
]
}
Example Response
{
"registryModelId": "someRegistryModelId",
"registryModelItemId": "someRegistryModelItemId"
}
Update Registry Model Version¶
Update a Registry Model version's comment and/or stages.
Example Request
{
"registryModelItemId": "someRegistryModelItemId",
"comment": "Some Comment",
"stages": [
"production",
"staging"
]
}
Example Response
"200 Ok"
Delete Registry Model Version¶
Delete a Registry Model version.
Example Response
"200 Ok"
Update Registry Model¶
Update a Registry Model's name, description, and/or visibility.
Example Request
{
"registryModelId": "someRegistryModelId",
"registryModelName": "newRegistryModelName",
"description": "New Description",
"isPublic": "[Boolean]"
}
Example Response
"200 Ok"
Update Registry Model Notes¶
Update the notes for a Registry Model.
Example Request
{
"workspaceName": "someWorkspaceName",
"registryModelName": "someRegistryModelName",
"notes": "A potentially very long notes string"
}
Example Response
"200 Ok"
Delete Registry Model¶
Delete a Registry Model
Example Response
"200 Ok"
Get Model Registry Count¶
Get Model Registry count
Example Response
{
"registryModelCount": 17
}
Add Registry Model Version Stage¶
Add a stage to a Registry Model Version.
Example Response
"200 Ok"
Remove Registry Model Version Stage¶
Remove a stage from a Registry Model Version.
Example Response
"200 Ok"
Send Experiment Keep-Alive Signal¶
Send an experiment's keep-alive signal. The response tells the client how often to send the keep-alive signal, and how often to report CPU and GPU usage. Typically, a live experiment requests that the isAliveBeatDurationMillis
is around 10 seconds, and an offline experiment requests about 10 minutes. In any event, the return status will send the suggested time intervals. The isAliveBeatDurationMillis
determines when an experiment is no longer shown as processing in the frontend GUI.
Example Response
{
"isAliveBeatDurationMillis": 10000,
"gpuMonitorIntervalMillis": 60000,
"cpuMonitorIntervalMillis": 68000
}
Set Experiment Start and End Time¶
Set an experiment's start and end time.
Example Request
{
"experimentKey: required": "someExperimentKey",
"startTimeMillis, optional": "[Long milliseconds since the Epoch at experiment start]",
"endTimeMillis, optional": "[Long milliseconds since the Epoch at experiment end]"
}
Example Response
{
"msg": "Saved"
}
Log Other¶
Log a key/value other
data (not a metric, system, or parameter). Note that you can only retrieve others summary data (e.g., this is not recorded as a full time series).
Example Request
{
"experimentKey: required": "someExperimentKey",
"key: required": "someKey",
"value: required": "someValue",
"timestamp, optional": "[Long milliseconds since the Epoch]"
}
Example Response
{
"msg": "Saved"
}
Log Parameter¶
Log a parameter name and value. Note that you can only retrieve parameters summary data (e.g., this is not recorded as a full time series).
Example Request
{
"experimentKey: required": "someExperimentKey",
"parameterName: required": "someParamName",
"parameterValue: required": "someParamValue",
"step, optional": "[Long experiment step]",
"timestamp: optional": "[Long milliseconds since the Epoch]"
}
Example Response
{
"msg": "Saved"
}
Log Metric¶
Log a metric name and value. Metrics are the only items that are logged as a full time series. However, even metrics can be throttled if too much data (either by rate or by count) is attempted to be logged.
Example Request
{
"experimentKey: required": "someExperimentKey",
"metricName: required": "someMetricName",
"metricValue: required": "someMetricValue",
"context, optional": "someContext",
"step, optional": "[Long experiment step]",
"epoch, optional": "[Long experiment epoch]",
"timestamp, optional": "[Long milliseconds since the Epoch]"
}
Example Response
{
"msg": "Saved"
}
Set HTML¶
Set (or append onto) an experiment's HTML.
Example Request
{
"experimentKey: required": "someExperimentKey",
"html: required": "someHtml",
"override, optional": "[Boolean if true overwrite old html, if false append]",
"timestamp: optional": "[Long milliseconds since the Epoch]"
}
Example Response
{
"msg": "Saved"
}
Upload Asset¶
Upload an asset.
Example Response
{
"msg": "Saved"
}
Upload Text Sample¶
Upload a text sample.
Example Request
{
"apiKey": "someApiKey",
"experimentKey: required": "someExperimentKey",
"step, optional": "[Int step]",
"context, optional": "someContext",
"metadata, optional": "[64 bit encoded metadata blob]",
"content": "The text sample"
}
Example Response
{
"msg": "Saved"
}
Upload Git Patch¶
Upload a git patch for this experiment.
Example Response
{
"msg": "Saved"
}
Set System Details¶
Set some or all of the system details.
Example Request
{
"experimentKey: required": "someExperimentKey",
"user, optional": "someUser",
"pythonVersion, optional": "somePythonVersion",
"pythonVersionVerbose, optional": "somePythonVersionVerbose",
"pid, optional": "[Int pid]",
"osType, optional": "someOsType",
"os, optional": "someOs",
"ip, optional": "someIp",
"hostname, optional": "someHostname",
"gpuStaticInfoList, optional, optional": [
{
"gpuIndex: required": "[Int index]",
"name: required": "gpu name",
"uuid: required": "gpu uuid",
"totalMemory: required": "[Int gpu total memory]",
"powerLimit: required": "[Int gpu power limit]"
}
],
"logAdditionalSystemInfoList": [
{
"key: required": "someKey",
"value: required": "someValue"
}
],
"networkInterfaceIps, optional, optional": [
"a network interface ip",
"another network interface ip"
],
"command, and arguments, optional, optional": [
"myScript.py",
"-arg",
"theArgument"
],
"executable": "/usr/local/bin/python",
"osPackages, optional, optional": [
"an os packages",
"another os package"
],
"installedPackages": [
"an installed packages",
"another installed package"
]
}
Example Response
{
"msg": "Saved"
}
Set Git Metadata¶
Set an experiment's git metadata.
Example Request
{
"experimentKey: required": "someExperimentKey",
"user: required": "gitUser",
"root: required": "gitRoot",
"branch: required": "gitBranch",
"parent: required": "gitParent",
"origin: required": "gitOrigin"
}
Example Response
{
"msg": "Saved"
}
Log Output¶
Log a line of standard output or standard error.
Example Request
{
"experimentKey: required": "someExperimentKey",
"context": "someContext",
"outputLines, required: required": [
{
"output": "someOutput",
"stderr": "[Boolean true is this was stdout, false if this was stderr]",
"localTimestamp": "[Long timestamp for this line of output]",
"offset": "[Long used to order lines of output]"
}
]
}
Example Response
{
"msg": "Saved"
}
Log Graph¶
Log an experiment's associated model graph.
Example Request
{
"experimentKey": "someExperimentKey",
"graph": "someGraph"
}
Example Response
{
"msg": "Saved"
}
Set Code¶
Set an experiment's associated source code.
Example Request
{
"experimentKey": "someExperimentKey",
"code": "someCode"
}
Example Response
{
"msg": "Saved"
}
Add Tags¶
Add a list of tags to an experiment.
Example Request
{
"experimentKey": "someExperimentKey",
"addedTags, optional": [
"someTag",
"anotherTag"
]
}
Example Response
{
"msg": "Saved"
}
Set a Cloud Detail Item¶
Set one of the cloud detail items
Example Request
{
"experimentKey": "someExperimentKey",
"provider": "aws",
"metadata": {
"key": "value"
}
}
Example Response
"[response]"
Set an Experiment's File-path¶
Set the file-path of an experiment
Example Request
{
"experimentKey": "someExperimentKey",
"filePath": "/tmp/1.py"
}
Example Response
"[response]"
Add GPU Metrics¶
Add an instance of GPU usage metrics.
Example Request
{
"experimentKey: required": "someExperimentKey",
"gpus": [
{
"gpuId: required": "[Int identifier]",
"freeMemory: required": "[Long]",
"usedMemory: required": "[Long]",
"gpuUtilization: required": "[Int percentage utilization]",
"totalMemory: required": "[Long]"
}
],
"context: optional": "someContext",
"step: optional": "[Long experiment step]",
"epoch: optional": "[Long experiment epoch]",
"timestamp: optional": "[Long milliseconds since the Epoch]"
}
Example Response
{
"msg": "Saved"
}
Add RAM Metrics¶
Add an instance of RAM usage metrics.
Example Request
{
"experimentKey: required": "someExperimentKey",
"totalRam: required": "[Long]",
"usedRam: required": "[Long]",
"context: optional": "someContext",
"step: optional": "[Long experiment step]",
"epoch: optional": "[Long experiment epoch]",
"timestamp: optional": "[Long milliseconds since the Epoch]"
}
Example Response
{
"msg": "Saved"
}
Add CPU Metrics¶
Add an instance of CPU usage metrics.
Example Request
{
"experimentKey: required": "someExperimentKey",
"cpuPercentUtilization: required": [
"12",
"99",
"[Int percentage, ordered by cpu]"
],
"context: optional": "someContext",
"step: optional": "[Long experiment step]",
"epoch: optional": "[Long experiment epoch]",
"timestamp: optional": "[Long milliseconds since the Epoch]"
}
Example Response
{
"msg": "Saved"
}
Add Processor Load Metrics¶
Add an instance of processor load metrics.
Example Request
{
"experimentKey: required": "someExperimentKey",
"loadAverage: required": "[Double]",
"context: optional": "someContext",
"step: optional": "[Long experiment step]",
"epoch: optional": "[Long experiment epoch]",
"timestamp: optional": "[Long milliseconds since the Epoch]"
}
Example Response
{
"msg": "Saved"
}
Update or Insert Artifact¶
Update an existing artifact or insert a new artifact
Example Request
{
"artifactName": "someArtifactName",
"experimentKey": "someExperimentKey",
"version": "1.0.0",
"artifactType": "dataframe",
"isPublic": false
}
Example Response
"[response]"
Set Artifact State¶
Set the state of an artifact
Example Request
{
"experimentKey": "someExperimentKey",
"artifactVersionId": "8bb9aa15-12d8-4068-ae85-5474232ccb00",
"isPublic": false,
"state": "CLOSED"
}
Example Response
"[response]"
Save Store¶
Save an entire store.
Example Request
{
"instanceId: required": "INSTANCE_ID",
"projectId: required": "PROJECT_ID",
"store: required": "\"{'store': '{key1: value1, ...}'}\""
}
Example Response
{
"msg": "Stored"
}
Upload Remote Assets¶
Upload remote assets
Example Request
{
"remoteAssets": [
{
"artifactId": "39ea3587-991f-43f7-be44-6add8cee282c",
"artifactVersionId": "692dd29d-086e-4dd8-852a-ed002ace1654",
"assetId": "someAssetId",
"type": "3d-points",
"fileName": "file.py",
"metadata": "{\"some\":\"metadata\"}",
"link": "some.com/source?test=123"
}
]
}
Example Response
"[response]"
Delete an Asset¶
Delete an experiment's asset
Example Response
"[response]"
Add an Asset Tag¶
Add a tag to an asset
Example Request
{
"experimentKey": "someExperimentKey",
"assetId": "cctWICTpuNVmtICxj6zjlveoz",
"tags": [
"otherTag"
]
}
Example Response
"[response]"
Delete an Asset Tag¶
Delete a tag from an asset
Example Response
"[response]"
Upload a Panel¶
Upload a Panel to a workspace
Example Response
"[response]"
Remote Procedure Call¶
Create a Remote Procedure Call (RPC) on an experiment
Example Response
"[response]"
Update Webhook Configuration¶
Update webhook configuration. The webhook notifies about any change in the Stage status of a specific registered model, or of any registered model in a specific workspace.
Example Request
{
"webhookConfigs": [
{
"workspaceName": "some-workspace",
"modelName": "some-model",
"webhookUrls": [
{
"url": "https://{customer-webhook-url-a}",
"header": {
"Authorization": "secret_token",
"Other": "other_info"
}
}
]
}
]
}
Example Response
"204"
Override Webhook Configuration¶
Configure a webhook. The webhook notifies about any change in the Stage status of a specific registered model, or of any registered model in a specific workspace.
Example Request
{
"webhookConfigs": [
{
"workspaceName": "some-workspace",
"modelName": "some-model",
"webhookUrls": [
{
"url": "https://{customer-webhook-url-a}",
"header": {
"Authorization": "secret_token",
"Other": "other_info"
}
}
]
}
]
}
Example Response
"204"
Create Service Account¶
Creates a Service Account on a workspace and organization.
Example Request
{
"name": "someServiceAccount",
"teamName": "someWorkspace",
"organizationName": "someOrganization"
}
Example Response
{
"apiKey": "someApiKey",
"authorizedWorkspaces": null,
"createdAt": "[Long milliseconds]",
"createdBy": "someUserName",
"defaultWorkspaceName": "someWorkspace",
"deleted": false,
"hasGlobalAccess": true,
"lastActivityAt": "[Long milliseconds]",
"name": "someServiceAccount",
"organizationId": "someOrganizationId"
}
Create Service Account restricted to a single workspace¶
Creates a Service Account that have access to a single workspace of an organization.
Example Request
{
"name": "someServiceAccount",
"teamName": "someWorkspace",
"organizationName": "someOrganization",
"authorizedWorkspaces": [
"someWorkspace"
]
}
Example Response
{
"apiKey": "someApiKey",
"authorizedWorkspaces": [
"someWorkspace"
],
"createdAt": "[Long milliseconds]",
"createdBy": "someUserName",
"defaultWorkspaceName": "someWorkspace",
"deleted": false,
"hasGlobalAccess": false,
"lastActivityAt": "[Long milliseconds]",
"name": "someServiceAccount",
"organizationId": "someOrganizationId"
}
Rotate Service Account API Key¶
Rotate Service Account API Key. Get the new key.
Example Response
{
"apiKey": "newApiKey"
}
Add User to Workspace¶
Add a user to a workspace.
Example Request
{
"userName": "someUser",
"workspaceName": "someWorkspace",
"admin": "[Boolean for wether the user wil be added as a workspace owner]"
}
Example Response
{
"msg": "added"
}