Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/bugfixes #307

Merged
merged 5 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ dependencies = [
"torchmetrics",
"rich==13.5.*",
"opencv-python==4.8.0.*",
"torch>=2.0,!=2.2.0"
"torch>=2.0,!=2.2.0",
"numpy<2.0"
]
dynamic = ["version"]

Expand Down
2 changes: 1 addition & 1 deletion sheeprl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
np.int = np.int64
np.bool = bool

__version__ = "0.5.7"
__version__ = "0.5.8.dev"


# Replace `moviepy.decorators.use_clip_fps_by_default` method to work with python 3.8, 3.9, and 3.10
Expand Down
4 changes: 1 addition & 3 deletions sheeprl/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ def unwrap_fabric(model: _FabricModule | nn.Module) -> nn.Module:
Returns:
nn.Module: the unwrapped model.
"""
model = copy.deepcopy(model)
if isinstance(model, _FabricModule):
model = model.module
model = copy.deepcopy(getattr(model, "module", model))
for name, child in model.named_children():
setattr(model, name, unwrap_fabric(child))
return model
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def preserve_global_rank_variable():
def restore_env_variables():
"""Ensures that environment variables set during the test do not leak out."""
env_backup = os.environ.copy()
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
os.environ["SHEEPRL_SEARCH_PATH"] = "file://tests/configs;pkg://sheeprl.configs"
yield
leaked_vars = os.environ.keys() - env_backup.keys()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_algos/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def standard_args():
"dry_run=True",
"checkpoint.save_last=False",
"env.num_envs=2",
f"env.sync_env={_IS_WINDOWS}",
"env.sync_env=True",
"env.capture_video=False",
"fabric.devices=auto",
"fabric.accelerator=cpu",
Expand Down
Loading