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

Naming Experiments - Bug Fix #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
13 changes: 6 additions & 7 deletions scripts/experiment.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
import gym
import gym
import safety_gym
import safe_rl
from safe_rl.utils.run_utils import setup_logger_kwargs
Expand All @@ -21,8 +21,9 @@ def main(robot, task, algo, seed, exp_name, cpu):
assert robot.lower() in robot_list, "Invalid robot"

# Hyperparameters
exp_name = algo + '_' + robot + task
if robot=='Doggo':
if exp_name is None:
exp_name = (algo + '_' + robot.lower() + task.lower())
if robot == 'Doggo':
num_steps = 1e8
steps_per_epoch = 60000
else:
Expand All @@ -37,7 +38,6 @@ def main(robot, task, algo, seed, exp_name, cpu):
mpi_fork(cpu)

# Prepare Logger
exp_name = exp_name or (algo + '_' + robot.lower() + task.lower())
logger_kwargs = setup_logger_kwargs(exp_name, seed)

# Algo and Env
Expand All @@ -58,7 +58,6 @@ def main(robot, task, algo, seed, exp_name, cpu):
)



if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
Expand All @@ -69,5 +68,5 @@ def main(robot, task, algo, seed, exp_name, cpu):
parser.add_argument('--exp_name', type=str, default='')
parser.add_argument('--cpu', type=int, default=1)
args = parser.parse_args()
exp_name = args.exp_name if not(args.exp_name=='') else None
main(args.robot, args.task, args.algo, args.seed, exp_name, args.cpu)
exp_name = args.exp_name if not(args.exp_name == '') else None
main(args.robot, args.task, args.algo, args.seed, exp_name, args.cpu)