Fix WandB configuration for proper logging
- Configure DPPO_WANDB_ENTITY environment variable in dev script - Update README with clear WandB setup instructions - Remove wandb=null to enable logging when credentials are set
This commit is contained in:
parent
e8e7233d98
commit
d43a9e2b3c
14
README.md
14
README.md
@ -119,14 +119,22 @@ tail -f logs/dppo_<job_id>.out
|
||||
|
||||
### Configuration
|
||||
|
||||
Before running experiments, set your WandB credentials:
|
||||
**Required for WandB logging**: Set your credentials as environment variables before submitting jobs:
|
||||
|
||||
```bash
|
||||
# Set these in your shell before running experiments
|
||||
export WANDB_API_KEY=<your_api_key>
|
||||
export WANDB_ENTITY=<your_username_or_team>
|
||||
export DPPO_WANDB_ENTITY=<your_username_or_team>
|
||||
|
||||
# Then submit jobs normally
|
||||
./submit_job.sh dev
|
||||
```
|
||||
|
||||
Or disable WandB by adding `wandb=null` to your python command.
|
||||
**Alternative**: Modify the SLURM scripts directly to set your credentials:
|
||||
- Edit `slurm/run_dppo_dev.sh` and replace `"your_wandb_username"` with your actual WandB username
|
||||
- Uncomment and set `WANDB_API_KEY` in the scripts
|
||||
|
||||
**Disable WandB**: Add `wandb=null` to python commands if you don't want logging.
|
||||
|
||||
### Repository Changes
|
||||
|
||||
|
@ -14,11 +14,12 @@
|
||||
# Load required modules
|
||||
module load devel/cuda/12.4
|
||||
|
||||
# Set environment variables
|
||||
# Set environment variables for WandB
|
||||
export WANDB_MODE=online
|
||||
export WANDB_PROJECT=dppo_dev_test
|
||||
# export WANDB_API_KEY=<your_api_key> # TODO: Set your API key
|
||||
# export WANDB_ENTITY=<your_entity> # TODO: Set your entity (username or team)
|
||||
export DPPO_WANDB_ENTITY=${DPPO_WANDB_ENTITY:-"your_wandb_username"} # TODO: Set your WandB username
|
||||
# TODO: Set your WandB API key as environment variable:
|
||||
# export WANDB_API_KEY=<your_api_key>
|
||||
|
||||
# Default paths (can be overridden by environment)
|
||||
export DPPO_DATA_DIR=${DPPO_DATA_DIR:-$SLURM_SUBMIT_DIR/data}
|
||||
@ -41,11 +42,11 @@ echo "PyTorch version: $(python -c 'import torch; print(torch.__version__)')"
|
||||
echo "CUDA available: $(python -c 'import torch; print(torch.cuda.is_available())')"
|
||||
echo ""
|
||||
|
||||
# Run a quick pre-training test with reduced epochs (disable WandB for dev test)
|
||||
# Run a quick pre-training test with reduced epochs
|
||||
# Note: Will only log to WandB if WANDB_API_KEY and DPPO_WANDB_ENTITY are properly set
|
||||
python script/run.py --config-name=pre_diffusion_mlp \
|
||||
--config-dir=cfg/gym/pretrain/hopper-medium-v2 \
|
||||
train.n_epochs=2 \
|
||||
train.save_model_freq=1 \
|
||||
wandb=null
|
||||
train.save_model_freq=1
|
||||
|
||||
echo "Dev test completed!"
|
Loading…
Reference in New Issue
Block a user