ppo-SnowballTarget / ml-agents-plugin-examples /mlagents_plugin_examples /tests /test_stats_writer_plugin.py
Download ml-agents-plugin-examples/mlagents_plugin_examples/tests/test_stats_writer_plugin.py from ashish2244/ppo-SnowballTarget: direct link, hf CLI and curl.
- Browser
- Download file 501 Bytes
-
https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/ml-agents-plugin-examples/mlagents_plugin_examples/tests/test_stats_writer_plugin.py
- Command line
-
hf download hf://ashish2244/ppo-SnowballTarget/ml-agents-plugin-examples/mlagents_plugin_examples/tests/test_stats_writer_plugin.py
-
curl -L -o test_stats_writer_plugin.py https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/ml-agents-plugin-examples/mlagents_plugin_examples/tests/test_stats_writer_plugin.py
501 Bytes
| import pytest | |
| from mlagents.plugins.stats_writer import register_stats_writer_plugins | |
| from mlagents.trainers.settings import RunOptions | |
| from mlagents_plugin_examples.example_stats_writer import ExampleStatsWriter | |
| def test_register_stats_writers(): | |
| # Make sure that the ExampleStatsWriter gets returned from the list of all StatsWriters | |
| stats_writers = register_stats_writer_plugins(RunOptions()) | |
| assert any(isinstance(sw, ExampleStatsWriter) for sw in stats_writers) | |