0

I'm using the following spec on my code to generate experiments:

experiment_spec = {
    "test_experiment": {
        "run": "PPO",
        "env": "MultiTradingEnv-v1",
        "stop": {
            "timesteps_total": 1e6
        },
        "checkpoint_freq": 100,
        "checkpoint_at_end": True,
        "local_dir": '~/Documents/experiment/',
        "config": {
            "lr_schedule": grid_search(LEARNING_RATE_SCHEDULE),
            "num_workers": 3,
            'observation_filter': 'MeanStdFilter',
            'vf_share_layers': True,
            "env_config": {
            },
        }
    }
}
ray.init()
run_experiments(experiments=experiment_spec)

Note that I use grid_search to try various learning rates. The problem is "lr_schedule" is defined as:

LEARNING_RATE_SCHEDULE = [
    [
        [0, 7e-5], # [timestep, lr]
        [1e6, 7e-6],
    ],
    [
        [0, 6e-5],
        [1e6, 6e-6],
    ]
]

So when the experiment checkpoint is generated it has a lot of [ in it's path name, making the path unreadable to the interpreter. Like this:

~/Documents/experiment/PPO_MultiTradingEnv-v1_0_lr_schedule=[[0, 7e-05], [3500000.0, 7e-06]]_2019-08-14_20-10-100qrtxrjm/checkpoint_40

The logic solution is to manually rename it but I discovered that its name is referenced in other files like experiment_state.json, so the best solution is to set a custom experiment path and name.

I didn't find anything in documentation.

This is my project if it helps

Can someone help?

Thanks in advance

1 Answers1

0

You can set custom trial names - https://ray.readthedocs.io/en/latest/tune-usage.html#custom-trial-names. Let me know if that works for you.

richliaw
  • 1,925
  • 16
  • 14
  • No :( the folders inside my "{trial_name_string}" still have the name similiar to `PPO_MultiTradingEnv-v1_0_lr_schedule=[[0, 7e-05], [3500000.0, 7e-06]]_2019-08-14_20-10-100qrtxrjm` – Lucas Draichi Sep 30 '19 at 22:06
  • what does your `custom_trial_name` function look like? it looks like you're including the `experiment_tag` or you're using the default `trial_name`. Can you try something like `def custom_trial_name(trial): return random_string`? – richliaw Sep 30 '19 at 23:54
  • I forgot to change the default example function lol, thanks for the quick response :) – Lucas Draichi Oct 01 '19 at 23:46