Skip to content

Commit

Permalink
add selfplay test
Browse files Browse the repository at this point in the history
  • Loading branch information
huangshiyu13 committed Nov 24, 2023
1 parent 17cf742 commit 4344954
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: do_unittest
timeout-minutes: 40
run: |
xvfb-run -s "-screen 0 1400x900x24" python3 -m pytest tests --cov=openrl --cov-report=xml -m unittest --cov-report=term-missing --durations=0 -v --color=yes
xvfb-run -s "-screen 0 1400x900x24" python3 -m pytest tests --cov=openrl --cov-report=xml -m unittest --cov-report=term-missing --durations=0 -v --color=yes -s
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions tests/test_selfplay/test_train_selfplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ def find_free_port():
scope="module",
params=[
{"port": find_free_port(), "strategy": "RandomOpponent"},
{"port": find_free_port(), "strategy": "LastOpponent"},
],
)
def config(request):
cfg_parser = create_config_parser()
cfg = cfg_parser.parse_args(["--config", "./examples/selfplay/selfplay.yaml"])
cfg.selfplay_api.port = request.param["port"]
print("port:",request.param["port"])
for i, c in enumerate(cfg.callbacks):
if c["id"] == "SelfplayCallback":
c["args"][
Expand Down

0 comments on commit 4344954

Please sign in to comment.