Skip to content

checkpoint push

Pushes a new Checkpoint to FCS from either the host machine running the FlexAI CLI or from a Remote Storage Provider Connection, such as Hugging Face, Amazon S3, Cloudflare R2 or GCP Cloud Storage.

Terminal window
flexai checkpoint push <checkpoint_name> [ (--file <path_on_filesystem>=<checkpoint_path> ...) | (--storage-provider <storage_provider_name> --source-path <source_path>)]
Required

The name that will be used to identify the Checkpoint while performing operations on it.

Examples
  • mistral-500-checkpoint
-f , --file
<string><key=value>
Required
Path

The local path to the checkpoint files on the host machine running the FlexAI CLI.

The Checkpoint will be mounted under /checkpoint/<checkpoint_name> at runtime by default.

Examples
  • --file output/checkpoints/ckpt.pt
Key Value Path Mapping

key=value pair with the <source_path> as key, and the <destination_path> as value.

The Checkpoint will be mounted under /checkpoint/<destination_path> at runtime.

Examples
  • --file output/checkpoints/=checkpoints_2025-01-01
Optional
Path

The path to the checkpoint files on a storage provider’s bucket.

It can point to a single file or a directory.

Examples
  • --source-path my-bucket/checkpoints/mistral-train/
Optional

Push local files in the ’~/checkpoints/dev’ directory to an FCS checkpoint named ‘bert-checkpoint’:

Terminal window
flexai checkpoint push bert-checkpoint \
--file ~/checkpoints/dev/model.bin=bert/model.bin \
--file ~/checkpoints/dev/config.json=bert/config.json

Push an entire local directory (preserving its structure) to an FCS Checkpoint named ‘my-checkpoint’:

Terminal window
flexai checkpoint push my-checkpoint --file ~/checkpoints/model

Push a directory on a Remote Storage Provider via a Remote Storage Provider Connection named ‘gcs-conn’ that’s in the bucket ‘data-bucket’ under the path ‘models/checkpoints/bert’ to an FCS Checkpoint named ‘gcs-checkpoint-bert’:

Terminal window
flexai checkpoint push gcs-checkpoint-bert --storage-provider gcs-conn --source-path data-bucket/models/checkpoints/bert

Push a Hugging Face model to a FlexAI Checkpoint named ‘bert-checkpoint’ via a Hugging Face Remote Storage Provider Connection named ‘hf-conn’:

Terminal window
flexai checkpoint push bert-checkpoint --storage-provider hf-conn --source-path google-bert/bert-base-uncased