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

Remove NumPy as a hard dependency #204

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Remove NumPy as a hard dependency #204

wants to merge 5 commits into from

Conversation

dgasmith
Copy link
Owner

@dgasmith dgasmith commented Nov 3, 2022

Description

This PR removes NumPy from opt_einsum as a runtime dependency. The change has little effect on the opt_einsum code base but significantly effects the testing infrastructure. Several testing strategies are currently employed to help understand the most effective one. Currently, these are:

  • Move all NumPy functions to a testing.py module with pytest.skip
  • Various pytest.skip functions wrapped in decorators
  • Local NumPy imports.

Feedback welcome!

Todos

Notable points that this PR has either accomplished or will accomplish.

  • Remove unused custom tensordot code
  • Remove import numpy from possibly_convert_to_numpy
  • Fix ssa_to_linear with a proper implementation

Questions

  • Question1

Status

  • Ready to go

@dgasmith dgasmith requested a review from jcmgray November 3, 2022 04:40
Copy link
Collaborator

@jcmgray jcmgray left a comment

Choose a reason for hiding this comment

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

LGTM so far! Do you understand the test failures, is that just an env thing?

@dgasmith
Copy link
Owner Author

I didn't get to every test yet. I'll hack a bit this weekend.

@dgasmith
Copy link
Owner Author

dgasmith commented Jan 4, 2023

@janeyx99 Is this still of interest to Torch? I think we're relatively close on removing that last of the NumPy dependancies.

@janeyx99
Copy link
Contributor

janeyx99 commented Jan 4, 2023

Yes! Removing the last dependencies would be awesome!

@dgasmith
Copy link
Owner Author

Apologies- I started a new job. This is in my mind and I hope to hack a little tomorrow night!

@dgasmith
Copy link
Owner Author

dgasmith commented May 5, 2024

@janeyx99 I'm looking to push another release shortly, is this still a requested feature?

@janeyx99
Copy link
Contributor

@dgasmith yes, torch still doesn't have a hard dependency on numpy (our tests do) so this is still desirable! Sorry it took a week to get back to you--this fell in my personal inbox.

@dgasmith
Copy link
Owner Author

I'll get in #232 first and then finalize this PR. It will be quite tidy to have no formal dependancies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants