<jupyter_start><jupyter_text>Roboschool<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-08:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'

os.makedirs(job_sub_dir)
os.makedirs(job_out_dir)
tasks_complement = ['RoboschoolInvertedPendulum-v1', 'RoboschoolInvertedPendulumSwingup-v1', 
                    'RoboschoolInvertedDoublePendulum-v1', 'RoboschoolReacher-v1', 'RoboschoolPong-v1']
## 2L ss 
tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size:
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --gres=gpu:{}        # request GPU "generic resource"\n'.format(GPU_NUM))
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --exp_name ddpg_n_step_2L_NoDelayTrain_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))

tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1']
n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size:
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --exp_name ddpg_n_step_2L_NoDelayTrain_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>2L Start Step 100<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-10:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'


tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1',
         'RoboschoolInvertedPendulum-v1', 'RoboschoolInvertedPendulumSwingup-v1',
         'RoboschoolInvertedDoublePendulum-v1', 'RoboschoolReacher-v1', 'RoboschoolPong-v1']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_cpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --data_dir spinup_data_ddpg_n_step_2L_ss100_Roboschool_new --exp_name ddpg_n_step_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))


tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1',
         'RoboschoolInvertedPendulum-v1', 'RoboschoolInvertedPendulumSwingup-v1',
         'RoboschoolInvertedDoublePendulum-v1', 'RoboschoolReacher-v1', 'RoboschoolPong-v1']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_1L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_cpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 1 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --data_dir spinup_data_ddpg_n_step_1L_ss100_Roboschool_new --exp_name ddpg_n_step_1L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>3L ss100<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-08:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'

# tasks = ['RoboschoolInvertedPendulum-v1', 'RoboschoolInvertedPendulumSwingup-v1',
#          'RoboschoolInvertedDoublePendulum-v1', 'RoboschoolReacher-v1', 'RoboschoolPong-v1']
tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_3L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 3 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --data_dir spinup_data_ddpg_n_step_Roboschool_3L_ss100 --exp_name ddpg_n_step_3L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>1L Start Step 100<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-08:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'

# tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1']
tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1',
         'RoboschoolInvertedPendulum-v1', 'RoboschoolInvertedPendulumSwingup-v1',
         'RoboschoolInvertedDoublePendulum-v1', 'RoboschoolReacher-v1', 'RoboschoolPong-v1']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 1 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --data_dir spinup_data_ddpg_n_step_Roboschool_1L_ss100 --exp_name ddpg_n_step_1L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))


tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1']
# tasks = ['RoboschoolInvertedPendulum-v1', 'RoboschoolInvertedPendulumSwingup-v1',
#          'RoboschoolInvertedDoublePendulum-v1', 'RoboschoolReacher-v1', 'RoboschoolPong-v1']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 1 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --data_dir spinup_data_ddpg_n_step_Roboschool_1L_ss100 --exp_name ddpg_n_step_1L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>1L Start Step 10000<jupyter_code># tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1']
tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1',
         'RoboschoolInvertedPendulum-v1', 'RoboschoolInvertedPendulumSwingup-v1',
         'RoboschoolInvertedDoublePendulum-v1', 'RoboschoolReacher-v1', 'RoboschoolPong-v1']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 1 --n_step {2} --replay_size {3} --without_delay_train --start_steps 10000 --data_dir spinup_data_ddpg_n_step_1L_ss10000 --exp_name ddpg_n_step_1L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>2L Start Step 10000<jupyter_code># tasks = ['RoboschoolAnt-v1', 'RoboschoolHalfCheetah-v1', 'RoboschoolWalker2d-v1', 'RoboschoolHopper-v1']
tasks = ['RoboschoolInvertedPendulum-v1', 'RoboschoolInvertedPendulumSwingup-v1',
         'RoboschoolInvertedDoublePendulum-v1', 'RoboschoolReacher-v1', 'RoboschoolPong-v1']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 10000 --data_dir spinup_data_ddpg_n_step_2L_ss10000_complement --exp_name ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))

import os
job_sub_dir = './job_scripts'
jobs = os.listdir('./job_scripts')
jobs.sort()
i=1
for job in jobs:
    code = os.system('sbatch {}'.format(os.path.join(job_sub_dir, job)))
    print('{} ---- {}: {}'.format(i, job, code))
    i += 1<jupyter_output><empty_output><jupyter_text>PyBulletGym<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-06:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'<jupyter_output><empty_output><jupyter_text>Start Step 100<jupyter_code>tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0',
         'ReacherPyBulletEnv-v0', 'PusherPyBulletEnv-v0', 'ThrowerPyBulletEnv-v0', 'StrikerPyBulletEnv-v0']
n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --exp_name ddpg_n_step_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))

tasks = ['InvertedPendulumPyBulletEnv-v0', 'InvertedPendulumSwingupPyBulletEnv-v0', 
         'InvertedDoublePendulumPyBulletEnv-v0', 'ReacherPyBulletEnv-v0']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_1L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_cpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 1 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --data_dir spinup_data_PyBulletEnv_1L_ss100_complement --exp_name ddpg_n_step_1L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>2L Start Step 10000<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-06:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'
tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0',
         'ReacherPyBulletEnv-v0', 'PusherPyBulletEnv-v0', 'ThrowerPyBulletEnv-v0', 'StrikerPyBulletEnv-v0']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 10000 --exp_name ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>2L Start Step 100<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-10:00'
JOB_MEMORY = '12000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'
tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0',
         'InvertedPendulumPyBulletEnv-v0', 'InvertedPendulumSwingupPyBulletEnv-v0', 
         'InvertedDoublePendulumPyBulletEnv-v0', 'ReacherPyBulletEnv-v0']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_cpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --data_dir spinup_data_ddpg_n_step_2L_ss100_PyBulletEnv_new --exp_name ddpg_n_step_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>Random Action Start Step 10000<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-06:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'
tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0',
         'ReacherPyBulletEnv-v0', 'PusherPyBulletEnv-v0', 'ThrowerPyBulletEnv-v0', 'StrikerPyBulletEnv-v0']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 10000 --random_action_baseline --exp_name ddpg_n_step_2L_NoDelayTrain_ss10000_random_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>Start Step 100 1L<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-06:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'
tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0',
         'ReacherPyBulletEnv-v0', 'PusherPyBulletEnv-v0', 'ThrowerPyBulletEnv-v0', 'StrikerPyBulletEnv-v0']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 1 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --exp_name ddpg_n_step_1L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))

import os
job_sub_dir = './job_scripts'
jobs = os.listdir('./job_scripts')
jobs.sort()
i=1
for job in jobs:
    code = os.system('sbatch {}'.format(os.path.join(job_sub_dir, job)))
    print('{} ---- {}: {}'.format(i, job, code))
    i += 1<jupyter_output><empty_output><jupyter_text>Start Step 10000 1L<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-06:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'
tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0',
         'ReacherPyBulletEnv-v0', 'PusherPyBulletEnv-v0', 'ThrowerPyBulletEnv-v0', 'StrikerPyBulletEnv-v0']

n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --seed {1} --l 1 --n_step {2} --replay_size {3} --without_delay_train --start_steps 10000 --exp_name ddpg_n_step_1L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))

import os
job_sub_dir = './job_scripts'
jobs = os.listdir('./job_scripts')
jobs.sort()
i=1
for job in jobs:
    code = os.system('sbatch {}'.format(os.path.join(job_sub_dir, job)))
    print('{} ---- {}: {}'.format(i, job, code))
    i += 1<jupyter_output><empty_output><jupyter_text>Nonstationary Env Start Step 100<jupyter_code>tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0']
n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --nonstationary_env --gravity_cycle 1000 --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 100 --exp_name ddpg_n_step_Nonstationary1000_2L_NoDelayTrain_ss100_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))<jupyter_output><empty_output><jupyter_text>Nonstationary Env Start Step 10000<jupyter_code>import numpy as np
import os
CPU_NUM = 2
JOB_TIME = '0-06:00'
JOB_MEMORY = '8000M'
job_sub_dir = './job_scripts'
job_out_dir = './job_scripts_output'

tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0']
n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --nonstationary_env --gravity_change_pattern gravity_averagely_harder --gravity_cycle 1000 --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 10000 --exp_name ddpg_n_step_NonstationaryHarder1000_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))



tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0']
n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --nonstationary_env --gravity_change_pattern gravity_averagely_equal --gravity_cycle 1000 --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 10000 --exp_name ddpg_n_step_NonstationaryEqual1000_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))



tasks = ['AntPyBulletEnv-v0', 'HalfCheetahPyBulletEnv-v0', 'Walker2DPyBulletEnv-v0', 'HopperPyBulletEnv-v0']
n_steps = ['1', '2', '3', '4', '5']
replay_size = ['1000000', '500000', '100000', '50000', '10000']
seeds = ['0', '1', '2', '3']
for s in seeds:
    for task in tasks:
        for n_s in n_steps:
            for b_s in replay_size: 
                job_filename = 'job_{0}_{1}_{2}_{3}.sh'.format(task, s, n_s, b_s)
                print(job_filename)
                with open(os.path.join(job_sub_dir, job_filename), 'w') as job_file:
                    job_file.write('#!/bin/bash\n')
                    job_file.write('#SBATCH --account=def-dkulic\n')
                    job_file.write('#SBATCH --cpus-per-task={}    #Maximum of CPU cores per GPU request: 6 on Cedar, 16 on Graham.\n'.format(CPU_NUM))
                    job_file.write('#SBATCH --mem={}               # memory per node\n'.format(JOB_MEMORY))
                    job_file.write('#SBATCH --time={}            # time (DD-HH:MM)\n'.format(JOB_TIME))
                    job_file.write('#SBATCH --output=./job_scripts_output/ddpg_n_step_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}_%N-%j.out        # %N for node name, %j for jobID\n'.format(task, s, n_s, b_s))
                    job_file.write('## Main processing command\n')
                    job_file.write('module load cuda cudnn \n')
                    job_file.write('source ~/tf_gpu/bin/activate\n')
                    job_file.write('python ./ddpg_n_step.py  --env {0} --nonstationary_env --gravity_change_pattern gravity_averagely_easier --gravity_cycle 1000 --seed {1} --l 2 --n_step {2} --replay_size {3} --without_delay_train --start_steps 10000 --exp_name ddpg_n_step_NonstationaryEasier1000_2L_NoDelayTrain_ss10000_{0}_{1}_{2}_{3}'.format(task, s, n_s, b_s))

import os
job_sub_dir = './job_scripts'
jobs = os.listdir('./job_scripts')
jobs.sort()
i=1
for job in jobs:
    code = os.system('sbatch {}'.format(os.path.join(job_sub_dir, job)))
    print('{} ---- {}: {}'.format(i, job, code))
    i += 1<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16159960865843218, 'fraction_numerical': 0.04493090375443316, 'mean_word_length': 2.6182300884955754, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '15', 'dir': 'jupyter-structured-clean-dedup', 'id': '482268', 'license': 'MIT', 'n_tokens_mistral': 16290, 'n_tokens_neox': 14781, 'n_words': 2812, 'path': 'spinup/algos/ddpg_multihead_n_step/generate_jobs.ipynb', 'repo_name': 'LinghengMeng/spinningup', 'size': '40885'}