-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from edbeeching/updates-sb3-version
Updates support of sb3 to latest version
- Loading branch information
Showing
13 changed files
with
119 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import argparse | ||
from godot_rl.wrappers.sample_factory_wrapper import sample_factory_training, sample_factory_enjoy | ||
|
||
|
||
def get_args(): | ||
parser = argparse.ArgumentParser(allow_abbrev=False) | ||
parser.add_argument("--env_path", default=None, type=str, help="Godot binary to use") | ||
parser.add_argument("--eval", default=False, action="store_true", help="whether to eval the model") | ||
parser.add_argument("--speedup", default=1, type=int, help="whether to speed up the physics in the env") | ||
parser.add_argument("--export", default=False, action="store_true", help="wheter to export the model") | ||
parser.add_argument("--viz", default=False, action="store_true", help="Whether to visualize one process") | ||
|
||
return parser.parse_known_args() | ||
|
||
|
||
|
||
def main(): | ||
args, extras = get_args() | ||
if args.eval: | ||
sample_factory_enjoy(args, extras) | ||
else: | ||
sample_factory_training(args, extras) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"] | |
build-backend = "setuptools.build_meta" | ||
[project] | ||
name = "godot_rl" | ||
version = "0.4.8" | ||
version = "0.5.1" | ||
authors = [ | ||
{ name="Edward Beeching", email="[email protected]" }, | ||
] | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
|
||
from godot_rl.core.utils import cant_import | ||
|
||
@pytest.mark.skipif(cant_import("sample_factory"), reason="sample_factory is not available") | ||
def test_sample_factory_training(): | ||
from godot_rl.wrappers.sample_factory_wrapper import sample_factory_training | ||
from examples.sample_factory_example import get_args | ||
args, extras = get_args() | ||
args.env_path = "examples/godot_rl_JumperHard/bin/JumperHard.x86_64" | ||
extras = [] | ||
extras.append('--env=gdrl') | ||
extras.append('--train_for_env_steps=1000') | ||
extras.append('--device=cpu') | ||
|
||
sample_factory_training(args, extras) |
This file contains 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