Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug that can not set the training device correctly #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
1 change: 1 addition & 0 deletions calm/learning/hrl_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class HRLAgent(common_agent.CommonAgent):
def __init__(self, base_name, config):
with open(os.path.join(os.getcwd(), config['llc_config']), 'r') as f:
llc_config = yaml.load(f, Loader=yaml.SafeLoader)
llc_config['params']['config']['device'] = config['device']
llc_config_params = llc_config['params']
self._latent_dim = llc_config_params['config']['latent_dim']

Expand Down
2 changes: 2 additions & 0 deletions calm/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ def main():

# Create default directories for weights and statistics
cfg_train['params']['config']['train_dir'] = args.output_path
cfg_train['params']['config']['device']=args.rl_device


if args.track:
wandb.init(
Expand Down