-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into version-0.5
- Loading branch information
Showing
23 changed files
with
4,695 additions
and
751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
#SBATCH --job-name=crossq | ||
#SBATCH --ntasks=32 | ||
#SBATCH --cpus-per-task=1 | ||
#SBATCH --gres=gpu:1 | ||
#SBATCH --output=slurm_logs/crossq_%j.txt | ||
#SBATCH --error=slurm_errors/crossq_%j.txt | ||
|
||
current_commit=$(git rev-parse --short HEAD) | ||
project_name="torchrl-example-check-$current_commit" | ||
group_name="crossq" | ||
export PYTHONPATH=$(dirname $(dirname $PWD)) | ||
python $PYTHONPATH/sota-implementations/crossq/crossq.py \ | ||
logger.backend=wandb \ | ||
logger.project_name="$project_name" \ | ||
logger.group_name="$group_name" | ||
|
||
# Capture the exit status of the Python command | ||
exit_status=$? | ||
# Write the exit status to a file | ||
if [ $exit_status -eq 0 ]; then | ||
echo "${group_name}_${SLURM_JOB_ID}=success" >> report.log | ||
else | ||
echo "${group_name}_${SLURM_JOB_ID}=error" >> report.log | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
#SBATCH --job-name=td3bc_offline | ||
#SBATCH --ntasks=32 | ||
#SBATCH --cpus-per-task=1 | ||
#SBATCH --gres=gpu:1 | ||
#SBATCH --output=slurm_logs/td3bc_offline_%j.txt | ||
#SBATCH --error=slurm_errors/td3bc_offline_%j.txt | ||
|
||
current_commit=$(git rev-parse --short HEAD) | ||
project_name="torchrl-example-check-$current_commit" | ||
group_name="td3bc_offline" | ||
export PYTHONPATH=$(dirname $(dirname $PWD)) | ||
python $PYTHONPATH/sota-implementations/td3_bc/td3_bc.py \ | ||
logger.backend=wandb \ | ||
logger.project_name="$project_name" \ | ||
logger.group_name="$group_name" | ||
|
||
# Capture the exit status of the Python command | ||
exit_status=$? | ||
# Write the exit status to a file | ||
if [ $exit_status -eq 0 ]; then | ||
echo "${group_name}_${SLURM_JOB_ID}=success" >>> report.log | ||
else | ||
echo "${group_name}_${SLURM_JOB_ID}=error" >>> report.log | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ scripts=( | |
run_ppo_mujoco.sh | ||
run_sac.sh | ||
run_td3.sh | ||
run_td3bc.sh | ||
run_dt.sh | ||
run_dt_online.sh | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# environment and task | ||
env: | ||
name: HalfCheetah-v4 | ||
task: "" | ||
library: gym | ||
max_episode_steps: 1000 | ||
seed: 42 | ||
|
||
# collector | ||
collector: | ||
total_frames: 1_000_000 | ||
init_random_frames: 25000 | ||
frames_per_batch: 1000 | ||
init_env_steps: 1000 | ||
device: cpu | ||
env_per_collector: 1 | ||
reset_at_each_iter: False | ||
|
||
# replay buffer | ||
replay_buffer: | ||
size: 1000000 | ||
prb: 0 # use prioritized experience replay | ||
scratch_dir: null | ||
|
||
# optim | ||
optim: | ||
utd_ratio: 1.0 | ||
policy_update_delay: 3 | ||
gamma: 0.99 | ||
loss_function: l2 | ||
lr: 1.0e-3 | ||
weight_decay: 0.0 | ||
batch_size: 256 | ||
alpha_init: 1.0 | ||
adam_eps: 1.0e-8 | ||
beta1: 0.5 | ||
beta2: 0.999 | ||
|
||
# network | ||
network: | ||
batch_norm_momentum: 0.01 | ||
warmup_steps: 100000 | ||
critic_hidden_sizes: [2048, 2048] | ||
actor_hidden_sizes: [256, 256] | ||
critic_activation: relu | ||
actor_activation: relu | ||
default_policy_scale: 1.0 | ||
scale_lb: 0.1 | ||
device: "cuda:0" | ||
|
||
# logging | ||
logger: | ||
backend: wandb | ||
project_name: torchrl_example_crossQ | ||
group_name: null | ||
exp_name: ${env.name}_CrossQ | ||
mode: online | ||
eval_iter: 25000 |
Oops, something went wrong.