Skip to main content

CLI for AcceleratorModule library (accmt).

Project description

AcceleratorModule CLI

CLI for AcceleratorModule library (accmt).

This is a command-line tool wrapper around Accelerate's command-line utilities ('accelerate').

Installation

accmt-cli is automatically installed when installing accmt library. You also install it via pip:

pip install accmt-cli

Launch

You can launch any distributed training process with the following command:

accmt launch [-N][-n, --gpus][-O1][--strat] <your_python_script> [...]

Where:

  • -N (optional): Corresponds to the number of processes, or a Python-like slice to take GPUs from a certain index (e.g. '-N=2:', to take GPUs from index 2).
  • -n or --gpus (optional): Corresponds to a list of CUDA devices (e.g. '-n=1,3,5,6', to take GPUs indices 1, 3, 5 and 6).
  • -O1 (optional): Corresponds to the optimization of type 1, which calculates the efficient number for 'OMP_NUM_THREADS', depending on how many processes you will run you training script.
  • --strat (optional): Corresponds to the specific strategy to implement, or a configuration file path from Accelerate ('accelerate config --config_file=your-config.yaml'). See 'accmt strats' for specific strategies. ... (optional): You can add here any additional arguments that your Python script might have.

Get model from checkpoint

You can get a model from any checkpoint using the following command:

accmt get <checkpoint> --out=<output-model-directory> [--dtype]

Where:

  • --out or -O (REQUIRED): Output model directory name where to save the model.
  • --dtype (Optional): PyTorch data type of model parameters. Default is 'float32'.

Strats

You can check the specific strats included with the following command:

accmt strats [--ddp][--fsdp][--deepspeed]

Where:

  • --ddp: To only filter for DDP strategies.
  • --fsdp: To only filter for FSDP strategies.
  • --deepspeed: To only filter for DeepSpeed strategies.

Example

Generate an example HPS file config with the following command:

accmt example

This will generate a file on your current directory called 'hps_example.yaml'.

Debug

Enable debug mode with:

accmt debug [--level] ...

Where --level flag is an integer number, which indicates the level of debugging. Available levels are: LEVEL 1:

  • Disables logging (MLFlow, Tensorboard, etc).

LEVEL 2:

  • Disables model and teacher compilation.

LEVEL 3:

  • Disables model saving, checkpointing and resuming (no folders will be created).

LEVEL 4 (default):

  • Force eval_when_start (in Trainer) to False.

LEVEL 5:

  • Disables any evaluation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

accmt_cli-1.4.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

accmt_cli-1.4.1-py3-none-any.whl (64.2 kB view details)

Uploaded Python 3

File details

Details for the file accmt_cli-1.4.1.tar.gz.

File metadata

  • Download URL: accmt_cli-1.4.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for accmt_cli-1.4.1.tar.gz
Algorithm Hash digest
SHA256 147ef5f3dc9ba85bc95e312e0781d6cff8d5aea695c19efcfa74b029d03d3e74
MD5 b28fb2671e085b77eb9f29b5dfb60286
BLAKE2b-256 03ffd30828abc43a46929036925b449cc779a60b87a5dda05a048873921bfb09

See more details on using hashes here.

File details

Details for the file accmt_cli-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: accmt_cli-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 64.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for accmt_cli-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a357a7bdbfabbc9188aadc04f4b5808e317184c49b6f8b2f313bdf2abc06e52
MD5 0e3959cc3e8dadaecb6e3e90ef23d0b8
BLAKE2b-256 5557aa61727cab0a96112452311e63552bdecf68d9e04a21007be0c8522d1b7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page