Documentation Index
Fetch the complete documentation index at: https://docs.flex.ai/llms.txt
Use this file to discover all available pages before exploring further.
Experiment Tracking
Experiment tracking involves systematically recording and managing details of machine learning experiments, such as code, data, configurations, parameters, metrics, and results. It ensures reproducibility, comparability, and accountability across experiments, aiding in efficient model development and deployment. Weights & Biases (wandb) is one approach to achieving this. Follow the next instructions to log experiments to your wandb account.Setting Up the Weights and Biases Secret
To enable seamless integration with wandb in your experiments, follow these steps to create the wandb secret:- Retrieve Your API Key Visit your Weights & Biases Settings page to find your API key. Copy the key for use in the next step.
-
Create the Secret
Use the
flexai secret createcommand to store your wandb API key as a secret. Replace<WANDB_API_KEY_SECRET_NAME>with your desired name for the secret:Then past your wandb API key value. - Note on Project Name Keep in mind that the project name used in your wandb setup does not need to be an FlexAI Secret. Additionally, the project name does not need to be pre-created in wandb — it will be automatically created if it doesn’t exist when you log your first experiment.
Log to Weights and Biases
You can now log experiments to your wandb account by adding the following flags to anyflexai training run command:
--run_name <YOUR_RUN_NAME> HuggingFace arg.
For more ways to customize and configure your wandb environment, check out the Weights & Biases Environment Variables Guide.
Setting Up the Experiment
Connect to GitHub (if needed)
If you haven’t already connected FlexAI to GitHub, you’ll need to set up a code registry connection:This will allow FlexAI to pull repositories directly from GitHub using the
-u flag in training commands.Running the Training Job with Experiment Tracking
Now that all the pieces are in place (wandb Secret, Source, and Dataset), you can run the training job with experiment tracking enabled.Code
code/causal-language-modeling/train.py
code/causal-language-modeling/requirements.txt
🚀 Run this on FlexAI
Managed checkpoints mean you never lose a run to preemption. Jobs launch in under 60 seconds — no infra setup, built-in observability.
Get started →Talk to us