Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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:
ray.logger.warning(
f"episode-ref {ref} died and can't be collected with error: {e}. This can happen if an EnvRunner is lost (for example because of a node failure) and is not critical in such cases."
)
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
12 changes: 5 additions & 7 deletions rllib/env/env_runner_group.py
Original file line number Diff line number Diff line change
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):
print(
f"module {module_path} not found while trying to get "
f"input {class_path}"
except (ModuleNotFoundError, ValueError) as e:
logger.warning(
f"module {module_path} not found using input {class_path} with error: {e}"
)
return False