ValueError: RolloutWorker has no `input_reader` object!

Hi everyone
I am trying to run a APEX_DDPG with tune on a multi-agent environment with Ray v1.10 on Python 3.9.6.
I get the following error:

raise ValueError("RolloutWorker has no input_reader object! "
ValueError: RolloutWorker has no input_reader object! Cannot call sample() . You can try setting create_env_on_driver to True.

This is my config file:

config={

"num_workers": 4,
"create_env_on_driver": True,
"multiagent": {
    "policies": {
     str(i): (None , game.agents[i].observation_space , game.agents[i].action_space , {"gamma": 0.9}) for i in range(0 , game.num_agents)},
    "policy_mapping_fn": 
     lambda agent_id:
         np.random.uniform(0 , game.agents[int(agent_id)].marginal_value[0]) 
}

}

@avnishn any ideas here?

Hi @amohazab,

That is not the actual error. That happens because of another error you can find in the full stacktrace.

The issue here is that you create policies that are keyed with strings of integers between 0 and num_agents.

Your policy mapping function is returning a float between 0.0 and num_agents.0. So there are two issues. First these are not strings and 2. They are not guaranteed to be whole numbers. You could get the policy id 1.1524 but there is no policy with that “name”.

Thanks a lot @mannyv . Ok, so should I use string names for policy keys?

By the way, this is the complete stack trace:

Failure # 1 (occurred at 2022-02-10_17-59-30)
Traceback (most recent call last):
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\tune\trial_runner.py", line 924, in _process_trial
    results = self.trial_executor.fetch_result(trial)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\tune\ray_trial_executor.py", line 787, in fetch_result
    result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\client_mode_hook.py", line 105, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\worker.py", line 1713, in get
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(ValueError): e[36mray::APEX_DDPG.train_buffered()e[39m (pid=20712, ip=127.0.0.1, repr=APEX_DDPG)
  File "python\ray\_raylet.pyx", line 625, in ray._raylet.execute_task
  File "python\ray\_raylet.pyx", line 629, in ray._raylet.execute_task
  File "python\ray\_raylet.pyx", line 578, in ray._raylet.execute_task.function_executor
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\function_manager.py", line 609, in actor_method_executor
    return method(__ray_actor, *args, **kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\tune\trainable.py", line 255, in train_buffered
    result = self.train()
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\tune\trainable.py", line 314, in train
    result = self.step()
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\agents\trainer.py", line 880, in step
    raise e
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\agents\trainer.py", line 867, in step
    result = self.step_attempt()
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\agents\trainer.py", line 920, in step_attempt
    step_results = next(self.train_exec_impl)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 756, in __next__
    return next(self.built_iterator)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 843, in apply_filter
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 843, in apply_filter
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 843, in apply_filter
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 1075, in build_union
    item = next(it)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 756, in __next__
    return next(self.built_iterator)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  [Previous line repeated 2 more times]
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 551, in base_iterator
    batch = ray.get(obj_ref)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\client_mode_hook.py", line 105, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\worker.py", line 1713, in get
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(ValueError): e[36mray::RolloutWorker.par_iter_next_batch()e[39m (pid=14596, ip=127.0.0.1, repr=<ray.rllib.evaluation.rollout_worker.RolloutWorker object at 0x0000023CA63E2D00>)
  File "python\ray\_raylet.pyx", line 625, in ray._raylet.execute_task
  File "python\ray\_raylet.pyx", line 629, in ray._raylet.execute_task
  File "python\ray\_raylet.pyx", line 578, in ray._raylet.execute_task.function_executor
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\function_manager.py", line 609, in actor_method_executor
    return method(__ray_actor, *args, **kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 1157, in par_iter_next_batch
    batch.append(self.par_iter_next())
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 1151, in par_iter_next
    return next(self.local_it)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 381, in gen_rollouts
    yield self.sample()
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 749, in sample
    raise ValueError("RolloutWorker has no `input_reader` object! "
ValueError: RolloutWorker has no `input_reader` object! Cannot call `sample()`. You can try setting `create_env_on_driver` to True.

@amohazab,

They can be strings or ints or any hashable type. The key is that the ids you give them in policies and the ids you return from policy_mapping_fn myst be consistent.

You were right. I changed my config file to this:

policies= {
    "policy_" + str(i): (None , game.agents[i].observation_space , game.agents[i].action_space , {}) for i in range(0,game.num_agents)
}

def policy_mapping_fn (agent_id: str):
    assert agent_id in [str(i) for i in range(0,20)], f"ERROR: invalid agent id {agent_id}!!!"
    return "policy_" + agent_id
        
config={
    "num_workers": 4,
    "create_env_on_driver": True,
    "multiagent": {
        "policies": policies,
        "policy_mapping_fn": policy_mapping_fn,
},
}

But I still get the following error:

Failure # 1 (occurred at 2022-02-17_15-17-46)
Traceback (most recent call last):
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\tune\trial_runner.py", line 924, in _process_trial
    results = self.trial_executor.fetch_result(trial)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\tune\ray_trial_executor.py", line 787, in fetch_result
    result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\client_mode_hook.py", line 105, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\worker.py", line 1713, in get
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(ValueError): e[36mray::PPO.train_buffered()e[39m (pid=8892, ip=127.0.0.1, repr=PPO)
  File "python\ray\_raylet.pyx", line 625, in ray._raylet.execute_task
  File "python\ray\_raylet.pyx", line 629, in ray._raylet.execute_task
  File "python\ray\_raylet.pyx", line 578, in ray._raylet.execute_task.function_executor
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\function_manager.py", line 609, in actor_method_executor
    return method(__ray_actor, *args, **kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\tune\trainable.py", line 255, in train_buffered
    result = self.train()
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\tune\trainable.py", line 314, in train
    result = self.step()
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\agents\trainer.py", line 880, in step
    raise e
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\agents\trainer.py", line 867, in step
    result = self.step_attempt()
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\agents\trainer.py", line 920, in step_attempt
    step_results = next(self.train_exec_impl)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 756, in __next__
    return next(self.built_iterator)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 843, in apply_filter
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 843, in apply_filter
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  [Previous line repeated 1 more time]
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 876, in apply_flatten
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 783, in apply_foreach
    for item in it:
  [Previous line repeated 1 more time]
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 471, in base_iterator
    yield ray.get(futures, timeout=timeout)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\client_mode_hook.py", line 105, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\worker.py", line 1713, in get
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(ValueError): e[36mray::RolloutWorker.par_iter_next()e[39m (pid=8100, ip=127.0.0.1, repr=<ray.rllib.evaluation.rollout_worker.RolloutWorker object at 0x000001D3DCA7FD90>)
  File "python\ray\_raylet.pyx", line 625, in ray._raylet.execute_task
  File "python\ray\_raylet.pyx", line 629, in ray._raylet.execute_task
  File "python\ray\_raylet.pyx", line 578, in ray._raylet.execute_task.function_executor
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\function_manager.py", line 609, in actor_method_executor
    return method(__ray_actor, *args, **kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 1151, in par_iter_next
    return next(self.local_it)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 381, in gen_rollouts
    yield self.sample()
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
    return method(self, *_args, **_kwargs)
  File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 749, in sample
    raise ValueError("RolloutWorker has no `input_reader` object! "
ValueError: RolloutWorker has no `input_reader` object! Cannot call `sample()`. You can try setting `create_env_on_driver` to True.

Hi @amohazab,

Progress I guess. The stack trace you just posted is not showing the actual error. Is there more to the error messages you did not include?

Oh sorry!

pid=1076) 2022-02-17 15:39:24,171	ERROR worker.py:84 -- Unhandled error (suppress with RAY_IGNORE_UNHANDLED_ERRORS=1): ray::RolloutWorker.par_iter_next() (pid=2100, ip=127.0.0.1, repr=<ray.rllib.evaluation.rollout_worker.RolloutWorker object at 0x000002C58FBBFD60>)
 pid=1076)   File "python\ray\_raylet.pyx", line 625, in ray._raylet.execute_task
 pid=1076)   File "python\ray\_raylet.pyx", line 629, in ray._raylet.execute_task
 pid=1076)   File "python\ray\_raylet.pyx", line 578, in ray._raylet.execute_task.function_executor
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\function_manager.py", line 609, in actor_method_executor
 pid=1076)     return method(__ray_actor, *args, **kwargs)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
 pid=1076)     return method(self, *_args, **_kwargs)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 1151, in par_iter_next
 pid=1076)     return next(self.local_it)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 381, in gen_rollouts
 pid=1076)     yield self.sample()
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
 pid=1076)     return method(self, *_args, **_kwargs)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 749, in sample
 pid=1076)     raise ValueError("RolloutWorker has no `input_reader` object! "
 pid=1076) ValueError: RolloutWorker has no `input_reader` object! Cannot call `sample()`. You can try setting `create_env_on_driver` to True.
 pid=1076) 2022-02-17 15:39:24,171	ERROR worker.py:84 -- Unhandled error (suppress with RAY_IGNORE_UNHANDLED_ERRORS=1): ray::RolloutWorker.par_iter_next() (pid=19392, ip=127.0.0.1, repr=<ray.rllib.evaluation.rollout_worker.RolloutWorker object at 0x000001E6267BFD30>)
 pid=1076)   File "python\ray\_raylet.pyx", line 625, in ray._raylet.execute_task
 pid=1076)   File "python\ray\_raylet.pyx", line 629, in ray._raylet.execute_task
 pid=1076)   File "python\ray\_raylet.pyx", line 578, in ray._raylet.execute_task.function_executor
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\function_manager.py", line 609, in actor_method_executor
 pid=1076)     return method(__ray_actor, *args, **kwargs)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
 pid=1076)     return method(self, *_args, **_kwargs)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 1151, in par_iter_next
 pid=1076)     return next(self.local_it)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 381, in gen_rollouts
 pid=1076)     yield self.sample()
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
 pid=1076)     return method(self, *_args, **_kwargs)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 749, in sample
 pid=1076)     raise ValueError("RolloutWorker has no `input_reader` object! "
 pid=1076) ValueError: RolloutWorker has no `input_reader` object! Cannot call `sample()`. You can try setting `create_env_on_driver` to True.
 pid=1076) 2022-02-17 15:39:24,172	ERROR worker.py:84 -- Unhandled error (suppress with RAY_IGNORE_UNHANDLED_ERRORS=1): ray::RolloutWorker.par_iter_next() (pid=3104, ip=127.0.0.1, repr=<ray.rllib.evaluation.rollout_worker.RolloutWorker object at 0x0000025C7AC4FD60>)
 pid=1076)   File "python\ray\_raylet.pyx", line 625, in ray._raylet.execute_task
 pid=1076)   File "python\ray\_raylet.pyx", line 629, in ray._raylet.execute_task
 pid=1076)   File "python\ray\_raylet.pyx", line 578, in ray._raylet.execute_task.function_executor
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\_private\function_manager.py", line 609, in actor_method_executor
 pid=1076)     return method(__ray_actor, *args, **kwargs)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
 pid=1076)     return method(self, *_args, **_kwargs)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\iter.py", line 1151, in par_iter_next
 pid=1076)     return next(self.local_it)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 381, in gen_rollouts
 pid=1076)     yield self.sample()
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\util\tracing\tracing_helper.py", line 451, in _resume_span
 pid=1076)     return method(self, *_args, **_kwargs)
 pid=1076)   File "C:\Users\mohazaa1\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 749, in sample
 pid=1076)     raise ValueError("RolloutWorker has no `input_reader` object! "
 pid=1076) ValueError: RolloutWorker has no `input_reader` object! Cannot call `sample()`. You can try setting `create_env_on_driver` to True.
---------------------------------------------------------------------------
TuneError                                 Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_18792\2749869898.py in <module>
----> 1 tune.run(
      2         "PPO",
      3         checkpoint_freq=10,
      4         stop={"episodes_total": 100},
      5         config=config

~\AppData\Local\Programs\Python\Python39\lib\site-packages\ray\tune\tune.py in run(run_or_experiment, name, metric, mode, stop, time_budget_s, config, resources_per_trial, num_samples, local_dir, search_alg, scheduler, keep_checkpoints_num, checkpoint_score_attr, checkpoint_freq, checkpoint_at_end, verbose, progress_reporter, log_to_file, trial_name_creator, trial_dirname_creator, sync_config, export_formats, max_failures, fail_fast, restore, server_port, resume, reuse_actors, trial_executor, raise_on_failed_trial, callbacks, max_concurrent_trials, queue_trials, loggers, _remote)
    618     if incomplete_trials:
    619         if raise_on_failed_trial and not state[signal.SIGINT]:
--> 620             raise TuneError("Trials did not complete", incomplete_trials)
    621         else:
    622             logger.error("Trials did not complete: %s", incomplete_trials)

TuneError: ('Trials did not complete', [PPO_f0e0c_00000])