Replies: 2 comments
-
现在有两个版本的vector env
|
Beta Was this translation helpful? Give feedback.
0 replies
-
1、VecEnv() SubEnv() VecEnv 将会调用 SubEnv, 使用多进程通信的方法,将任意的 single env 包装成 vectorized env。这种包装方法,对任意single env 都是通用的。能并行开启 4~32 个 single env 获得线性加速。 【问题】VecEnv() SubEnv() 通过多进程方式的并行,是否可以弃用了。只用上述VecEnv 即可? 还是 建议 搭配使用 多进程开启 多个VecEnv? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
1.1 在Colab 上 运行jupyter notebook https://github.com/AI4Finance-Foundation/FinRL-Tutorials/blob/master/1-Introduction/China_A_share_market_tushare.ipynb
1.2 在本地电脑运行 python程序 https://github.com/AI4Finance-Foundation/FinRL-Tutorials/blob/master/1-Introduction/China_A_share_market_tushare.py
1.3 体验金融数据处理流程:下载,预处理,装入仿真环境
1.4 体验对金融RL训练中,关键超参数的实际影响:
batch_size, horizon_len, repeat_times
2.1 将不支持多GPU的 stablebaselines3 更换成 自己的RL训练代码,可以参考 ELegantRL 的 singlefilePPO https://github.com/AI4Finance-Foundation/ElegantRL/blob/master/helloworld/helloworld_PPO_single_file.py
2.2 尝试 multiple workers
2.3 尝试 multiple learners
2.3.1 DataParallel 参考这里的代码 ✨ DataParallel and DistributedDataParallel for speed up training. RLSolver#43
2.3.2 有兴趣可以挑战其他并行方案,但时候再写
3.1 单个仿真环境 StockTradingEnv
ElegantRL/elegantrl/envs/StockTradingEnv.py
Line 9 in 68bf0ea
3.2 并行仿真环境 StockTradingVecEnv
ElegantRL/elegantrl/envs/StockTradingEnv.py
Line 155 in 68bf0ea
3.3 对比训练的代码 train_ppo_a2c_for_stock_trading
ElegantRL/examples/demo_A2C_PPO.py
Line 325 in 68bf0ea
3.4 更换成自己的数据,训练并行仿真环境
RL训练代码每个必要模块的结构,包含每个函数的输入、输出、用法。我已经整理在:
https://github.com/AI4Finance-Foundation/ElegantRL/blob/master/helloworld/README.md
Beta Was this translation helpful? Give feedback.
All reactions