# Thinking Machines Lab

> Work with Tinker training runs, sessions, samplers and model checkpoints.

App · 12 actions. Web page: https://docs.lodol.com/docs/integrations/thinking-machines-lab

## Actions

### Assign session to project

Assign session to project.

**Inputs**

- Session (`session_id`, text, required): Session ID.
- Project ID (`project_id`, text, required): Project ID.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {}
}
```

### Delete checkpoint

Delete checkpoint.

**Inputs**

- Training run (`training_run_id`, text, required): Training run ID.
- Checkpoint (`checkpoint_id`, text, required): Checkpoint ID from List training run checkpoints.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {}
}
```

### Get checkpoint model details

Get checkpoint model details.

**Inputs**

- Tinker path (`tinker_path`, text, required): Tinker path returned by the checkpoint listing.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "base_model": "example",
    "is_lora": false,
    "lora_rank": 1,
    "optimizer_config": {}
  }
}
```

### Get sampler

Get sampler.

**Inputs**

- Sampler ID (`sampler_id`, text, required): Sampler ID.
- Access scope (`access_scope`, text): Show your own resources or every resource you can access. One of: `owned`, `accessible`.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "base_model": "example",
    "model_path": "example",
    "sampler_id": "example"
  }
}
```

### Get session

Get session.

**Inputs**

- Session (`session_id`, text, required): Session ID.
- Access scope (`access_scope`, text): Show your own resources or every resource you can access. One of: `owned`, `accessible`.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "display_name": "example",
    "sampler_ids": [],
    "training_run_ids": [],
    "user_metadata": {}
  }
}
```

### Get training run

Get training run.

**Inputs**

- Training run (`training_run_id`, text, required): Training run ID.
- Access scope (`access_scope`, text): Show your own resources or every resource you can access. One of: `owned`, `accessible`.

**Outputs**

- `data` (object): Item.

**Example output**

```json
{
  "data": {
    "base_model": "example",
    "corrupted": false,
    "is_lora": false,
    "last_checkpoint": {
      "base_model": "example",
      "checkpoint_id": "example",
      "checkpoint_type": "example",
      "expires_at": "example",
      "public": false,
      "size_bytes": 1,
      "time": "example",
      "tinker_path": "example"
    },
    "last_request_time": "example",
    "last_sampler_checkpoint": {
      "base_model": "example",
      "checkpoint_id": "example",
      "checkpoint_type": "example",
      "expires_at": "example",
      "public": false,
      "size_bytes": 1,
      "time": "example",
      "tinker_path": "example"
    },
    "lora_rank": 1,
    "model_owner": "example",
    "training_run_id": "example",
    "user_metadata": {}
  }
}
```

### List sessions

List sessions.

**Inputs**

- Limit (`limit`, number): Number of records in a page. At least 1.
- Offset (`offset`, number): Number of records to skip. At least 0.
- Access scope (`access_scope`, text): Show your own resources or every resource you can access. One of: `owned`, `accessible`.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "sessions": []
  }
}
```

### List supported base models

List supported base models.

**Inputs**: None.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "supported_models": []
  }
}
```

### List training run checkpoints

List training run checkpoints.

**Inputs**

- Training run (`training_run_id`, text, required): Training run ID.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "checkpoints": []
  }
}
```

### List training runs

List training runs.

**Inputs**

- Limit (`limit`, number): Number of records in a page. At least 1.
- Offset (`offset`, number): Number of records to skip. At least 0.
- Access scope (`access_scope`, text): Show your own resources or every resource you can access. One of: `owned`, `accessible`.
- Project ID (`project_id`, text): Project ID.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "cursor": {
      "limit": 1,
      "offset": 1,
      "total_count": 1
    },
    "training_runs": []
  }
}
```

### List your checkpoints

List your checkpoints.

**Inputs**

- Limit (`limit`, number): Number of records in a page. At least 1.
- Offset (`offset`, number): Number of records to skip. At least 0.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "checkpoints": [],
    "cursor": {
      "limit": 1,
      "offset": 1,
      "total_count": 1
    }
  }
}
```

### Set checkpoint lifetime

Set checkpoint lifetime.

**Inputs**

- Training run (`training_run_id`, text, required): Training run ID.
- Checkpoint (`checkpoint_id`, text, required): Checkpoint ID from List training run checkpoints.
- TTL seconds (`ttl_seconds`, number, required): Seconds from now before the checkpoint expires. From 3600 to 315360000.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {}
}
```
