Closed maxmatical closed 5 years ago
This is currently not supported, though you are welcome to submit a PR that makes this possible.
On Jul 3, 2019, at 2:00 PM, Max Tian notifications@github.com wrote:
If I want the environment to return the numpy array of account_histories so I can pull out values or do visualizations, how can I do that?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Do you have an idea/documentation on how to return custom variables? I've tried writing a function that returns the account_history, but I get AttributeError: 'DummyVecEnv' object has no attribute 'return_acc_hist'
and I can't find any documentation on how to return custom variables in an environment
DummyVecEnv
is a wrapper around other environments (see here). It includes a method called env_method
, which should allow you to invoke any method defined on the underlying environment, like your return_acc_hist
method.
Do I call it like env.env_method(return_acc_hist)
or something like that? I tried that but I get NameError: name '_return_trade_history' is not defined
so I feel like I'm doing something wrong
The issue is solved, I had to write the method name as a string env.env_method('return_acc_hist')
If I want the environment to return the numpy array of account_histories so I can pull out values or do visualizations, how can I do that?