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:
ys1087@partner.kit.edu
2025-08-27 12:23:43 +02:00
parent e8e7233d98
commit d43a9e2b3c
2 changed files with 18 additions and 9 deletions
+7 -6
View File
@@ -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!"