Skip to content

Best break_step value #785

Answered by farzinaa
farzinaa asked this question in Q&A
Discussion options

You must be logged in to vote

This seems to be working if anyone is interested:

def sample_params(trial:optuna.Trial,):
break_step = trial.suggest_categorical("break_step", [1e4, 1e5])
gamma = trial.suggest_categorical("gamma", [0.8, 0.9, 0.95, 0.98, 0.99])
learning_rate = trial.suggest_loguniform("learning_rate", 1e-6, 1e-3)
ERL_PARAMS = {
"break_step":break_step,
"gamma": gamma,
"learning_rate": learning_rate,
}
return ERL_PARAMS
def objective(trial:optuna.Trial):
hyperparameters = sample_params(trial)
ERL_PPO_PARAMS = dict(itertools.islice(hyperparameters.items(), 2, 3))
break_step = hyperparameters['break_step']
train(
drl_lib='elegantrl',
env=env,
model_name='ppo',
erl_params= ERL_PPO_PARAMS,
cwd='./papertrading_…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by farzinaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant