Skip to content

Commit 013df33

Browse files
author
Chris Elion
authored
handle no plugins found (#4969) (#4973)
1 parent 52a6f80 commit 013df33

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ml-agents/mlagents/plugins/stats_writer.py

+8
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ def register_stats_writer_plugins(run_options: RunOptions) -> List[StatsWriter]:
4343
and evaluates them, and returns the list of all the StatsWriter implementations.
4444
"""
4545
all_stats_writers: List[StatsWriter] = []
46+
if ML_AGENTS_STATS_WRITER not in importlib_metadata.entry_points():
47+
logger.warning(
48+
f"Unable to find any entry points for {ML_AGENTS_STATS_WRITER}, even the default ones. "
49+
"Uninstalling and reinstalling ml-agents via pip should resolve. "
50+
"Using default plugins for now."
51+
)
52+
return get_default_stats_writers(run_options)
53+
4654
entry_points = importlib_metadata.entry_points()[ML_AGENTS_STATS_WRITER]
4755

4856
for entry_point in entry_points:

0 commit comments

Comments
 (0)