Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions amp_rsl_rl/runners/amp_on_policy_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ def update_run_name_with_sequence(prefix: str) -> None:
mean_task_reward_log += rewards.mean().item()
mean_style_reward_log += style_rewards.mean().item()

# Combine the task and style rewards (TODO this can be a hyperparameters)
rewards = 0.5 * rewards + 0.5 * style_rewards
# Combine the task and style rewards
rewards = self.cfg['task_reward_weight'] * rewards + self.cfg['style_reward_weight'] * style_rewards

self.alg.process_env_step(rewards, dones, infos)
self.alg.process_amp_step(next_amp_obs)
Expand Down
26 changes: 26 additions & 0 deletions example/agents_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from isaaclab.utils import configclass
from isaaclab_rl.rsl_rl import RslRlOnPolicyRunnerCfg

@configclass
class YourConfigName(RslRlOnPolicyRunnerCfg):
experiment_name = "XXX"
discriminator = {
"hidden_dims": [512, 256],
"reward_scale": 1.0,
"loss_type": "BCEWithLogits" # Choose between BCEWithLogits or Wasserstein
}

# Weights for combining task and style rewards
task_reward_weight = 0.5
style_reward_weight = 0.5

amp_data_path = "path of the dataset folder"
dataset_names = ["files",
"without",
".npy",
]
dataset_weights = [1.0 for i in range(len(dataset_names))]
slow_down_factor = 1.0

def __post_init__(self):
self.algorithm.class_name = "AMP_PPO"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.algorithm.class_name = "AMP_PPO"
self.algorithm.class_name = "AMP_PPO"