Closed BingHan0458 closed 2 years ago
Good question, I haven't done a good job keeping the test_case_fn
methods up to date as things have changed. I tried to automate the process of generating new test cases but it's really badly maintained, sorry about that.
In the dataset generation script, here the code sets the test case kwarg 'agents_policy'
-- in the past this was supposed to be a Policy
class, but now it should be a string (e.g., 'noncoop'
or others defined in this dict. You also may also want to remove the for policy in policies:
loop to simplify things -- I think it is supposed to take in a list of policies and generate trajectories for all of those policies.
regarding the nonetype error -- i suspect that is related to the test_case_fn
, because that line should only be executed for agents who have an ExternalPolicy
. because one of the agents has an externalpolicy (probably because that is how agents were initialized in test_case_fn
, whose default policy argument is "learning" (an externalpolicy)), the line that gives the error is looking for an externally provided actions
dict, but i doubt the dataset collection script or run_episode
method provides that dict. You may want to start with all agents using a built-in policies, such as ga3c-cadrl, and then they will choose actions "internally" to the environment.
all of that to say: i think the error will go away if you replace L129 with test_case_args['policies'] = 'noncoop'
and then clean up all the things about policies in run_trajectory_dataset_creator.py
. Then you could try to add back in the relevant pieces to get a ga3c-cadrl policy to work.
Hello, when I run
./gym_collision_avoidance/experiments/run_trajectory_dataset_creator.sh
according to https://gym-collision-avoidance.readthedocs.io/en/latest/pages/use_cases.html#collect-a-dataset-of-trajectories, there is an error as follows:So I try to replace
agents = test_case_fn()
withagents = test_case_fn(**test_case_args)
, but there is another error:How to solve it? Thank you very much!