示例#1
0
def run_variant(experiment, variant):
    lu.run_experiment(
        experiment,
        variant=variant,
        # run_id=variant["run_id"],
        mode=variant["mode"],
        exp_prefix=variant["exp_prefix"],
        exp_id=variant["exp_id"],
        instance_type=variant["instance_type"],
        use_gpu=variant["use_gpu"],
        snapshot_mode=variant["snapshot_mode"],
        snapshot_gap=variant["snapshot_gap"],
        base_log_dir=variant["base_log_dir"],
        num_exps_per_instance=variant.get("num_exps_per_instance", 1),
        prepend_date_to_exp_prefix=False,
        # spot_price=variant["spot_price"],
        region=variant.get("region", "us-east-1"),
        time_in_mins=variant.get("time_in_mins", 0),
        ssh_host=variant.get("ssh_host", None),
    )
示例#2
0
#   5. Execute bash command: CUDA_VISIBLE_DEVICES=? python realworld_analyzer.py -da [cloth,poke,solid]

if __name__ == "__main__":
    parser = ArgumentParser()
    parser.add_argument('-da',
                        '--dataset',
                        type=str,
                        default=None,
                        required=True)  # stack_o2p2_60k, pickplace_1env_1k
    parser.add_argument('-m', '--mode', type=str, default='here_no_doodad')

    args = parser.parse_args()

    # models: list of dictionaries containing the information of the models to be loaded/run
    # Images will be of form: T images wide, 1st row is true images, then next rows are dictated by models, where
    #  each model takes K+1 rows, where the 1st row is the combined reconstruction and the next K are the subimages
    variant = dict(
        models=dataset_to_models[args.dataset],
        T=8,  # Set this!
        dataset=args.dataset)

    # Relevant options: 'here_no_doodad', 'local_docker', 'ec2'
    run_experiment(
        create_images_from_dataset,  # Set this! get_mse_from_dataset, create_images_from_dataset, analyze_mse, create_mse_graphs
        exp_prefix='images-{}'.format(args.dataset),
        mode=args.mode,
        variant=variant,
        use_gpu=True,  # Turn on if you have a GPU
        seed=None,
        region='us-west-2')
示例#3
0
文件: train_op3.py 项目: pvskand/OP3
    parser.add_argument('-de', '--debug', type=int, default=1)
    parser.add_argument('-m', '--mode', type=str, default='here_no_doodad')

    args = parser.parse_args()

    if args.variant == 'stack':
        variant = stack_variant
    elif args.variant == 'pickplace':
        variant = pickplace_variant
    elif args.variant == 'cloth':
        variant = cloth_variant
    else:
        raise Exception("Exp variant not found")

    variant['debug'] = args.debug
    # Relevant options: 'here_no_doodad', 'local_docker', 'ec2'
    run_experiment(
        train_vae,
        exp_prefix='{}'.format(args.variant),
        mode=args.mode,
        variant=variant,
        use_gpu=True,  # Turn on if you have a GPU
        seed=None,
        region='us-west-2' # only used if mode is ec2
    )





示例#4
0
文件: mpc_stack.py 项目: pvskand/OP3
            op3_args=params_to_info[args.model_file]["op3_args"],
            cem_args=dict(
                cem_steps=5,
                num_samples=1000,
                time_horizon=1,
            ),
            cost_args=dict(
                core_type='final_recon',  # "subimage", "final_recon", "latent"
                # latent_or_subimage = 'subimage',
                compare_func='mse',
                post_process='raw',
                aggregate='min',
            ),
            filter_goal_image=False,
            structure=s,
            debug=args.debug,
            model_file=args.model_file,
        )

        n_seeds = 1
        exp_prefix = 'iodine-mpc-stage1-k7-v2-unfactorized-fixed'

        run_experiment(
            main,
            exp_prefix=exp_prefix,
            mode=args.mode,
            variant=variant,
            use_gpu=True,  # Turn on if you have a GPU
            region='us-west-2',
        )
示例#5
0
        cem_args=dict(
            cem_steps=5,
            num_samples=200,
            time_horizon=num_goal_objects,
            action_type=
            4,  # Should be [None, 4], This controls if it is object oriented (when set to 4) or raw env action space (None)
        ),
        num_actions_to_take=num_goal_objects * 2,
        num_action_to_take_per_plan=num_goal_objects,
        cost_args=dict(
            core_type='final_recon',  # "subimage", "final_recon", "latent"
            compare_func='mse',  # mse, psuedo_intersect
            post_process='raw',
            aggregate='sum',
        ),
        goal_start_end_range=[0, 100],
        debug=args.debug,
        model_file=args.model_file,
        number_goal_objects=num_goal_objects,
    )

    run_experiment(
        main,
        exp_prefix='iodine-mpc-stage3-n{}-{}-v2'.format(
            variant["number_goal_objects"], args.model_file),
        mode=args.mode,
        variant=variant,
        use_gpu=True,  # Turn on if you have a GPU
        region='us-west-2',
    )