示例#1
0
)
local_launcher = doodad.LocalMode()



"""
ENV=walker2d-medium-v0
python scripts/brac/train_offline.py \
  --alsologtostderr --sub_dir=0 \
  --env_name=$ENV --identifier="train_bc" \
  --agent_name=bc \
  --total_train_steps=300000 \
  --n_train=1000000 \
  --gin_bindings="train_eval_offline.model_params=((200, 200),)" \
  --gin_bindings="train_eval_offline.batch_size=256" \
  --gin_bindings="train_eval_offline.optimizers=(('adam', 5e-4),)"
"""

doodad.run_python(
    target='brac/train_offline.py',
    mode=local_launcher,
    mounts=mounts,
    docker_image='justinfu/brac_flow:0.3',
    verbose=True,
    cli_args='--alsologtostderr --save_freq=1000 --sub_dir=0 --env_name=%s --identifier="train_bc" --agent_name=bc --total_train_steps=300000 --n_train=1000000 --model_arch=0 --opt_params=0' % env_name
             #'--gin_bindings="train_eval_offline.model_params=((200, 200),)" ' + \
             #'--gin_bindings="train_eval_offline.batch_size=256" ' + \
             #'--gin_bindings="train_eval_offline.optimizers=((\'adam\', 5e-4),)"'
)

示例#2
0
#                                mount_point='/data/b_ckpt'
#                                ))

mounts.append(
    doodad.MountLocal(
        local_dir=
        "/data/doodad_results/merge-random/learn/flow-merge-random-v0/train_bc/bc/0/0/",
        mount_point="/data/b_ckpt",
    ))

cli_args = (
    "--alsologtostderr --sub_dir=auto --env_name={env_name} --agent_name={agent_type} --total_train_steps=500000 --model_arch=1 --opt_params=1 "
    + "--b_ckpt={b_ckpt} --value_penalty={value_penalty} ")
cli_args = cli_args.format(
    env_name=env_name,
    agent_type="brac_primal",
    alpha=0.3,
    value_penalty=1,
    divergence="kl",
    b_ckpt="/data/b_ckpt/agent_behavior",
)

doodad.run_python(
    target="brac/train_offline.py",
    mode=local_launcher,
    mounts=mounts,
    docker_image="justinfu/brac_flow:0.3",
    verbose=True,
    cli_args=cli_args,
)
示例#3
0
                      pythonpath=True,
                      filter_dir=('data', '.git', 'awr_env')))
mounts.append(
    doodad.MountLocal(local_dir='~/code/d4rl',
                      mount_point='/code/d4rl',
                      pythonpath=True,
                      filter_dir=('data', '.git', 'scripts')))
mounts.append(
    doodad.MountLocal(local_dir='~/.d4rl/rlkit/%s' % dirname,
                      mount_point='/datasets'))
mounts.append(
    doodad.MountLocal(local_dir='/data/doodad/awr',
                      mount_point='/data',
                      output=True))

gcp_launcher = doodad.GCPMode(gcp_bucket='justin-doodad',
                              gcp_log_path='doodad/logs/bear',
                              gcp_project='qlearning000',
                              instance_type='n1-standard-1',
                              zone='us-west1-a',
                              gcp_image='ubuntu-1804-docker-gpu',
                              gcp_image_project='qlearning000')
local_launcher = doodad.LocalMode()

doodad.run_python(target='scripts/run_flow.py',
                  mode=local_launcher,
                  mounts=mounts,
                  docker_image='justinfu/awr_flow:0.1',
                  verbose=True,
                  cli_args='--output_dir=/data --env=' + env_name)