Skip to content

Commit 3b09765

Browse files
authored
DEP Remove pytorch from environment.yml (#49798)
* no torch * set matplotlib to minimum version * take mpl pin out again * use pip for matplotlib * remove default channel * no pin needed if no default channel? * turns out we gotta pin * 🔥 remove torch * undo asv.conf.json change * comment out pytorch * remove commented-out torch Co-authored-by: MarcoGorelli <>
1 parent 0429b64 commit 3b09765

File tree

6 files changed

+1
-35
lines changed

6 files changed

+1
-35
lines changed

asv_bench/benchmarks/frame_ctor.py

-17
Original file line numberDiff line numberDiff line change
@@ -205,21 +205,4 @@ def time_frame_from_arrays_sparse(self):
205205
)
206206

207207

208-
class From3rdParty:
209-
# GH#44616
210-
211-
def setup(self):
212-
try:
213-
import torch
214-
except ImportError:
215-
raise NotImplementedError
216-
217-
row = 700000
218-
col = 64
219-
self.val_tensor = torch.randn(row, col)
220-
221-
def time_from_torch(self):
222-
DataFrame(self.val_tensor)
223-
224-
225208
from .pandas_vb_common import setup # noqa: F401 isort:skip

ci/deps/actions-38-downstream_compat.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,3 @@ dependencies:
6767
- pandas-datareader
6868
- pyyaml
6969
- py
70-
- pytorch

environment.yml

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ dependencies:
6969
- pandas-datareader
7070
- pyyaml
7171
- py
72-
- pytorch
7372

7473
# local testing dependencies
7574
- moto

pandas/tests/test_downstream.py

-14
Original file line numberDiff line numberDiff line change
@@ -242,20 +242,6 @@ def test_pyarrow(df):
242242
tm.assert_frame_equal(result, df)
243243

244244

245-
def test_torch_frame_construction(using_array_manager):
246-
# GH#44616
247-
torch = import_module("torch")
248-
val_tensor = torch.randn(700, 64)
249-
250-
df = DataFrame(val_tensor)
251-
252-
if not using_array_manager:
253-
assert np.shares_memory(df, val_tensor)
254-
255-
ser = Series(val_tensor[0])
256-
assert np.shares_memory(ser, val_tensor)
257-
258-
259245
def test_yaml_dump(df):
260246
# GH#42748
261247
yaml = import_module("yaml")

requirements-dev.txt

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ coverage
5858
pandas-datareader
5959
pyyaml
6060
py
61-
torch
6261
moto
6362
flask
6463
asv

scripts/generate_pip_deps_from_conda.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
EXCLUDE = {"python", "c-compiler", "cxx-compiler"}
2424
REMAP_VERSION = {"tzdata": "2022.1"}
25-
RENAME = {"pytables": "tables", "geopandas-base": "geopandas", "pytorch": "torch"}
25+
RENAME = {"pytables": "tables", "geopandas-base": "geopandas"}
2626

2727

2828
def conda_package_to_pip(package: str):

0 commit comments

Comments
 (0)