Comments (4)
Thanks for reporting it. We are looking into it.
from finrl-meta.
setting TRAIN_END_DATE = '2021-09-30'
also gives the below error
AttributeError Traceback (most recent call last)
<ipython-input-97-21c42d37b7d1> in <module>()
11 erl_params=ERL_PARAMS,
12 break_step=5e4,
---> 13 if_vix=False
14 )
3 frames
<ipython-input-36-a440fe771f96> in train(start_date, end_date, ticker_list, data_source, time_interval, technical_indicator_list, drl_lib, env, model_name, if_vix, **kwargs)
35 trained_model = agent.train_model(model=model,
36 cwd=current_working_dir,
---> 37 total_timesteps=break_step)
38
39 elif drl_lib == 'rllib':
/FinRL-Meta/drl_agents/elegantrl_models.py in train_model(self, model, cwd, total_timesteps)
79 model.cwd = cwd
80 model.break_step = total_timesteps
---> 81 train_and_evaluate(args=model)
82
83 @staticmethod
/usr/local/lib/python3.7/dist-packages/elegantrl/train/run_tutorial.py in train_and_evaluate(***failed resolving arguments***)
91 traj_list = agent.explore_env(env, target_step)
92 steps, r_exp = update_buffer(traj_list)
---> 93 logging_tuple = agent.update_net(buffer, batch_size, repeat_times, soft_update_tau)
94 with torch.no_grad():
95 if_reach_goal, if_save = evaluator.evaluate_and_save(agent.act, steps, r_exp, logging_tuple)
/usr/local/lib/python3.7/dist-packages/elegantrl/agents/AgentPPO.py in update_net(self, buffer, batch_size, repeat_times, soft_update_tau)
196
197 a_std_log = getattr(self.act, 'a_std_log', torch.zeros(1)).mean()
--> 198 return obj_critic.item(), obj_actor.item(), a_std_log.item() # logging_tuple
199
200 def get_reward_sum_raw(self, buf_len, buf_reward, buf_mask, buf_value) -> (torch.Tensor, torch.Tensor):
AttributeError: 'NoneType' object has no attribute 'item'
from finrl-meta.
setting
TRAIN_END_DATE = '2021-09-30'
also gives the below errorAttributeError Traceback (most recent call last) <ipython-input-97-21c42d37b7d1> in <module>() 11 erl_params=ERL_PARAMS, 12 break_step=5e4, ---> 13 if_vix=False 14 ) 3 frames <ipython-input-36-a440fe771f96> in train(start_date, end_date, ticker_list, data_source, time_interval, technical_indicator_list, drl_lib, env, model_name, if_vix, **kwargs) 35 trained_model = agent.train_model(model=model, 36 cwd=current_working_dir, ---> 37 total_timesteps=break_step) 38 39 elif drl_lib == 'rllib': /FinRL-Meta/drl_agents/elegantrl_models.py in train_model(self, model, cwd, total_timesteps) 79 model.cwd = cwd 80 model.break_step = total_timesteps ---> 81 train_and_evaluate(args=model) 82 83 @staticmethod /usr/local/lib/python3.7/dist-packages/elegantrl/train/run_tutorial.py in train_and_evaluate(***failed resolving arguments***) 91 traj_list = agent.explore_env(env, target_step) 92 steps, r_exp = update_buffer(traj_list) ---> 93 logging_tuple = agent.update_net(buffer, batch_size, repeat_times, soft_update_tau) 94 with torch.no_grad(): 95 if_reach_goal, if_save = evaluator.evaluate_and_save(agent.act, steps, r_exp, logging_tuple) /usr/local/lib/python3.7/dist-packages/elegantrl/agents/AgentPPO.py in update_net(self, buffer, batch_size, repeat_times, soft_update_tau) 196 197 a_std_log = getattr(self.act, 'a_std_log', torch.zeros(1)).mean() --> 198 return obj_critic.item(), obj_actor.item(), a_std_log.item() # logging_tuple 199 200 def get_reward_sum_raw(self, buf_len, buf_reward, buf_mask, buf_value) -> (torch.Tensor, torch.Tensor): AttributeError: 'NoneType' object has no attribute 'item'
You may try to reset 'target_step' as a number larger than the episode steps. You can set target_step by setting ERL_PARAMS = {..., "target_step": x ,...} .
from finrl-meta.
@rayrui312 Yep you are right.
Regarding the original issue, i came across it too but it works on retrying. probably just an issue with requests
from finrl-meta.
Related Issues (20)
- FinRL_China_A_Share_Market.ipynb中运行plotter.plot()报错
- issue : examples/FinRL_Ensemble_StockTrading_ICAIF_2020.ipynb HOT 1
- China_A_share_market_tushare AttributeError HOT 4
- ccxt==1.90.41 doesn't exist HOT 5
- All installations run smoothly but it cannot download any of the financial data.
- FinRL_PaperTrading_Demo.ipynb: TypeError: Invalid comparison between dtype=datetime64[ns] and Timestamp
- FinRL_MultiCrypto_Trading example not working due to import error on from agents.elegantrl_models import DRLAgent as DRLAgent_erl
- An error when running examples /FinRL_Ensemble_StockTrading_ICAIF_2020.ipynb HOT 5
- This error appears while training: -ValueError: Parameter `start` received with timezone defined as 'UTC' although a Date must be timezone naive.
- This error appears while training: ( ValueError: Parameter `start` received with timezone defined as 'UTC' although a Date must be timezone naive.) HOT 2
- ValueError: Parameter `start` received with timezone defined as 'UTC' although a Date must be timezone naive. HOT 2
- install error HOT 3
- profit_taken does not seem to be correct!
- alpaca_trade_api version conflict with vectorbt[full] 0.23.3 HOT 1
- AttributeError: 'DataFrame' object has no attribute 'date' HOT 1
- ImportError: cannot import name 'init_agent' from 'elegantrl.train.run'
- ModuleNotFound Error
- Bug in "Aarons_portfolio_optimization_example" HOT 1
- Download Issue HOT 1
- FinRL_PortfolioOptimizationEnv_Demo.ipynb HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finrl-meta.