AI4Finance-Foundation / AI4Finance-Foundation/ElegantRL

Issue with explore_one_env() and update_buffer()

Open
#193 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
4.4k
Forks
978
PR merge metrics
No merged PRs in 30d

Description

Test Evn: Colab, SAC, env_num == 1

-In train/run.py, line 93: trajectory, step = agent.explore_env(env, args.num_seed_steps * args.num_steps_per_episode, True)
Error message: explore_one_env() takes 3 positional arguments but 4 were given

explore_one_env is defined in Agents/AgentBase.py, def explore_one_env(self, env, target_step: int) -> list:
You can see that explore_one_env only can handle 3 parameters but 4 were given in run.py.

-another error message pop up with the same line in run.py
trajectory, step = agent.explore_env(env, args.num_seed_steps * args.num_steps_per_episode, True)
Error Message: too many values to unpack (expected 2)

explore_one_env func return trajectory without step

-in replay_buffer.py, line 131, states, rewards, masks, actions = [torch.cat(item, dim=0) for item in traj_items]
Error message: ValueError: too many values to unpack (expected 4)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.