Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions rllib/core/learner/training_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ def solve_refs(self):
for ref in episode_refs:
try:
episodes.extend(ray.get(ref))
except ray.exceptions.OwnerDiedError:
pass
except ray.exceptions.OwnerDiedError as e:
print(
f"episode-ref {ref} died and can't be collected with error: {e}"
)
self.episodes = episodes
self.episodes_refs = None

Expand Down
2 changes: 2 additions & 0 deletions rllib/core/rl_module/rl_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ def __init__(
except AttributeError as e:
if "'NoneType' object has no attribute " in e.args[0]:
raise (self._catalog_ctor_error or e)
raise e

self._is_setup = True
# Cache value for returning from `is_stateful` so we don't have to call
# the module's `get_initial_state()` method all the time (might be expensive).
Expand Down
14 changes: 6 additions & 8 deletions rllib/env/env_runner_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,8 @@ def stop(self) -> None:
self.foreach_env_runner(
lambda w: w.stop(), healthy_only=False, local_env_runner=True
)
except Exception:
logger.exception("Failed to stop workers!")
except Exception as e:
logger.exception(f"Failed to stop workers with {e}")
finally:
self._worker_manager.clear()

Expand Down Expand Up @@ -1282,9 +1282,8 @@ def _make_worker(
.remote(**kwargs)
)

@classmethod
def _valid_module(cls, class_path):
del cls
@staticmethod
def _valid_module(class_path):
if (
isinstance(class_path, str)
and not os.path.isfile(class_path)
Expand All @@ -1295,9 +1294,8 @@ def _valid_module(cls, class_path):
spec = importlib.util.find_spec(module_path)
if spec is not None:
return True
except (ModuleNotFoundError, ValueError):
except (ModuleNotFoundError, ValueError) as e:
print(
f"module {module_path} not found while trying to get "
f"input {class_path}"
f"module {module_path} not found using input {class_path} with error: {e}"
)
return False