Skip to content

Commit

Permalink
remove unused libraries (#454)
Browse files Browse the repository at this point in the history
* remove numba

* remove pyvirtualdisplay and scikit dependencies
  • Loading branch information
TimotheeMathieu authored Apr 19, 2024
1 parent 6e75cb5 commit d66faeb
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 87 deletions.
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ pip install rlberry
To install rlberry with more options, you can use ``pip install rlberry[xxxxxxxx]``, with `xxxxxxxx` as :

- `torch` to install `opencv-python, ale-py, stable-baselines3, tensorboard, torch`
- `extras` to install `optuna, numba, ffmpeg-python, pyvirtualdisplay, scikit-fda, scikit-learn`
- `extras` to install `optuna, ffmpeg-python, scikit-fda`

(for dev)

Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,13 @@ moviepy = "*"
pyopengl = "*"
optuna ={version="*", optional=true}
ffmpeg-python = {version="*", optional=true}
pyvirtualdisplay = {version="*", optional=true}
opencv-python = {version="*", optional=true}
ale-py = {version="*", optional=true}
stable-baselines3 = {version="*", optional=true}
tensorboard = {version="*", optional=true}
torch = {version=">=2.0.0, !=2.0.1, !=2.1.0", optional=true}
pandas = "*"
numba = "^0.58.1"
scikit-fda = {version="^0.9", optional=true}
scikit-learn = {version="1.2.2", optional=true}
sphinx = {version="6.2.1", optional=true}
sphinx-gallery = { version= "^0.14.0", optional=true}
sphinx-math-dollar = {version="^1.2.1", optional=true}
Expand All @@ -60,7 +57,7 @@ multimethod = {version="1.10", optional=true} # new version 1.11 : crash our

[tool.poetry.extras]
torch = ["opencv-python", "ale-py", "stable-baselines3", "tensorboard", "torch"]
extras = ["optuna", "numba", "ffmpeg-python", "pyvirtualdisplay", "scikit-fda", "scikit-learn"]
extras = ["optuna", "ffmpeg-python", "scikit-fda"]
doc = ["sphinx", "sphinx-gallery", "sphinx-math-dollar", "numpydoc", "myst-parser", "sphinxcontrib-video", "matplotlib"]

[tool.poetry.group.dev]
Expand Down
6 changes: 0 additions & 6 deletions rlberry/check_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@
import torch.utils.tensorboard
except ModuleNotFoundError: # pragma: no cover
TENSORBOARD_INSTALLED = False # pragma: no cover

NUMBA_INSTALLED = True
try:
import numba
except ModuleNotFoundError: # pragma: no cover
NUMBA_INSTALLED = False # pragma: no cover
6 changes: 0 additions & 6 deletions rlberry/rendering/tests/test_rendering_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import pytest
import sys

from pyvirtualdisplay import Display
from rlberry_research.envs.classic_control import MountainCar
from rlberry_research.envs.classic_control import Acrobot
from rlberry_research.envs.classic_control import Pendulum
Expand All @@ -20,11 +19,6 @@

import tempfile

try:
display = Display(visible=0, size=(1400, 900))
display.start()
except Exception:
pass

classes = [
Acrobot,
Expand Down
16 changes: 0 additions & 16 deletions rlberry/utils/jit_setup.py

This file was deleted.

2 changes: 0 additions & 2 deletions rlberry/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,3 @@ def configure_logging(
gym.logger.set_level(
logging.getLevelName(level) + 10
) # If info -> go to warning gym level. If debug, go to info.
numba_logger = logging.getLogger("numba")
numba_logger.setLevel(logging.WARNING)
35 changes: 0 additions & 35 deletions rlberry/utils/metrics.py

This file was deleted.

17 changes: 0 additions & 17 deletions rlberry/utils/tests/test_metrics.py

This file was deleted.

0 comments on commit d66faeb

Please sign in to comment.