Tianshou/test/pettingzoo/test_pistonball_continuous.py
Michael Panchenko 600f4bbd55
Python 3.9, black + ruff formatting (#921)
Preparation for #914 and #920

Changes formatting to ruff and black. Remove python 3.8

## Additional Changes

- Removed flake8 dependencies
- Adjusted pre-commit. Now CI and Make use pre-commit, reducing the
duplication of linting calls
- Removed check-docstyle option (ruff is doing that)
- Merged format and lint. In CI the format-lint step fails if any
changes are done, so it fulfills the lint functionality.

---------

Co-authored-by: Jiayi Weng <jiayi@openai.com>
2023-08-25 14:40:56 -07:00

24 lines
546 B
Python

import pprint
import pytest
from pistonball_continuous import get_args, train_agent, watch
@pytest.mark.skip(reason="runtime too long and unstable result")
def test_piston_ball_continuous(args=get_args()):
if args.watch:
watch(args)
return
result, agent = train_agent(args)
# assert result["best_reward"] >= 30.0
if __name__ == "__main__":
pprint.pprint(result)
# Let's watch its performance!
watch(args, agent)
if __name__ == "__main__":
test_piston_ball_continuous(get_args())