Self-play tuning - #350
Merged
Merged
Conversation
alejandromarcu
commented
Mar 4, 2026
Comment on lines
-35
to
-55
| ) | ||
| runs_dir = args.runs_dir if args.runs_dir is not None else str(Path(__file__).parent.parent) | ||
|
|
||
| config = load_config_and_setup_run(args.config_file, runs_dir, overrides=args.overrides) | ||
|
|
||
| use_rust = config.self_play.program == "rust" | ||
| if use_rust: | ||
| # Apply default Rust binary path if not specified in config | ||
| if config.self_play.rust_selfplay_binary is None: | ||
| config.self_play.rust_selfplay_binary = str( | ||
| Path(__file__).parent.parent | ||
| / "rust" | ||
| / "target" | ||
| / "release" | ||
| / "selfplay" | ||
| ) | ||
| rust_binary = config.self_play.rust_selfplay_binary | ||
| if not Path(rust_binary).exists(): | ||
| print(f"ERROR: Rust self-play binary not found at {rust_binary}") | ||
| print( | ||
| "Build it with: cd deep_quoridor/rust && cargo build --release --features binary --bin selfplay" | ||
| ) |
Collaborator
Author
There was a problem hiding this comment.
I moved this to load_config_and_setup_run for clarity
adamantivm
reviewed
Mar 6, 2026
| parser.add_argument("--games", type=str, help="Comma-separated parallel_games values") | ||
| parser.add_argument("--duration", type=str, default="2 minutes", help="Duration per combo (default: '2 minutes')") | ||
| parser.add_argument("--runs-dir", type=str, default=None, help="Directory for runs") | ||
| parser.add_argument("--extra-overrides", nargs="*", default=[], help="Additional config overrides for train_v2.py") |
Collaborator
There was a problem hiding this comment.
isn't this the same as -o? Shouldn't it also be -o for consistency?
Collaborator
|
Can you include the YAML you used to test in this PR, as you show in the description? It will be handy for experiments in the future, when we trace back to this and want to reproduce your test run. I have that and one more obersvation, then LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This new script allows to run self-play with different configurations of num_workers and parallel_games to figure out which combination is faster for the specific training in that hardware.
Mostly done by Claude!
For example:
It can also be used to tune the rust self play: