RussTedrake/manipulation

purge scipy dependency

Closed this issue · 1 comments

Now that Drake has removed it: RobotLocomotion/drake#14691 .

It's currently coming from the policy gradient exercise:

==================== Test output for //exercises/rl:policy_gradient:
Matplotlib created a temporary config/cache directory at /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/matplotlib-cukhora2 because the default path (/Users/runner/.matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_runner/7b4dc6001ecdbeb1b5ef1e14edba8c[37](https://github.com/RussTedrake/manipulation/runs/7597131080?check_suite_focus=true#step:5:38)/sandbox/darwin-sandbox/47/execroot/manipulation/bazel-out/darwin-fastbuild/bin/exercises/rl/policy_gradient.runfiles/manipulation/exercises/rl/policy_gradient.ipynb.py", line 23, in <module>
    from scipy.signal import lfilter
ModuleNotFoundError: No module named 'scipy'
================================================================================

and pymcubes

==================== Test output for //:trajectories:
Matplotlib created a temporary config/cache directory at /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/matplotlib-6aqucvrt because the default path (/Users/runner/.matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_runner/7b4dc6001ecdbeb1b5ef1e14edba8c37/sandbox/darwin-sandbox/355/execroot/manipulation/bazel-out/darwin-fastbuild/bin/trajectories.runfiles/manipulation/trajectories.ipynb.py", line 24, in <module>
    import mcubes
  File "/private/var/tmp/_bazel_runner/7b4dc6001ecdbeb1b5ef1e14edba8c37/sandbox/darwin-sandbox/3[55](https://github.com/RussTedrake/manipulation/runs/7597131080?check_suite_focus=true#step:5:56)/execroot/manipulation/bazel-out/darwin-fastbuild/bin/trajectories.runfiles/pip/pypi__pymcubes/mcubes/__init__.py", line 4, in <module>
    from .smoothing import *
  File "/private/var/tmp/_bazel_runner/7b4dc6001ecdbeb1b5ef1e14edba8c37/sandbox/darwin-sandbox/355/execroot/manipulation/bazel-out/darwin-fastbuild/bin/trajectories.runfiles/pip/pypi__pymcubes/mcubes/smoothing.py", line 11, in <module>
    from scipy import sparse
ModuleNotFoundError: No module named 'scipy'
================================================================================

And adding it to requirements.in is breaking pip-compile. jazzband/pip-tools#1660

This slack thread is related: https://drakedevelopers.slack.com/archives/C3YB3EV5W/p1660409592486729
Drake doesn't depend on scipy anymore, but still expects callers to depend on it if they want to use sparse matrices.