AI4Finance-Foundation / FinRL-Meta

FinRL­-Meta: Dynamic datasets and market environments for FinRL.
https://ai4finance.org
MIT License
1.2k stars 560 forks source link

Create FinRL_PBT_PB2__Raytune_for_Hyperparameter_Optimization.ipynb #201

Closed Athe-kunal closed 2 years ago

zhumingpassional commented 2 years ago

good codes.

I have several suggestions, which can improve the notebook.

1, you used def sample_ddpg_params() to obtain a dict, why not directly using a dict like this: sample_ddpg_param = { "buffer_size": tune.choice([int(1e4), int(1e5), int(1e6)]), "lr": tune.loguniform(1e-5, 1), "train_batch_size": tune.choice([32, 64, 128, 256, 512]) }

2, pls import INDICATORS instead of using config.INDICATORS

3, pls use type hint in functions, e.g., def DRL_prediction( model_name, test_env_config, env, model_config, agent_path, env_name_test='StockTrading_test_env' )

4, pls add figs for the results.

Athe-kunal commented 2 years ago

Thank you for your valuable suggestions Suggestion 1: Generally, the sampling dictionaries are wrapped in functions in hyperparameter optimization. So I thought I should follow the general convention. But yes, dictionaries are passed to the configuration file so it can be a dictionary. Also, the suggestion will take some time to incorporate, but I will do the changes 2 and 3 right away. Thanks

zhumingpassional commented 2 years ago

ok. good.