Skip to content

DEP Remove pytorch from environment.yml #49798

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

Merged
merged 13 commits into from
Nov 24, 2022
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
17 changes: 0 additions & 17 deletions asv_bench/benchmarks/frame_ctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,4 @@ def time_frame_from_arrays_sparse(self):
)


class From3rdParty:
# GH#44616

def setup(self):
try:
import torch
except ImportError:
raise NotImplementedError

row = 700000
col = 64
self.val_tensor = torch.randn(row, col)

def time_from_torch(self):
DataFrame(self.val_tensor)


from .pandas_vb_common import setup # noqa: F401 isort:skip
1 change: 0 additions & 1 deletion ci/deps/actions-38-downstream_compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ dependencies:
- pandas-datareader
- pyyaml
- py
- pytorch
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ dependencies:
- pandas-datareader
- pyyaml
- py
- pytorch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't you comment it out with a note?

# local testing dependencies
- moto
Expand Down
14 changes: 0 additions & 14 deletions pandas/tests/test_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,20 +242,6 @@ def test_pyarrow(df):
tm.assert_frame_equal(result, df)


def test_torch_frame_construction(using_array_manager):
# GH#44616
torch = import_module("torch")
val_tensor = torch.randn(700, 64)

df = DataFrame(val_tensor)

if not using_array_manager:
assert np.shares_memory(df, val_tensor)

ser = Series(val_tensor[0])
assert np.shares_memory(ser, val_tensor)


def test_yaml_dump(df):
# GH#42748
yaml = import_module("yaml")
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ coverage
pandas-datareader
pyyaml
py
torch
moto
flask
asv
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_pip_deps_from_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

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


def conda_package_to_pip(package: str):
Expand Down