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

Drop unnecessary dependencies #60

Merged
merged 2 commits into from
Nov 23, 2024
Merged

Drop unnecessary dependencies #60

merged 2 commits into from
Nov 23, 2024

Conversation

jwallwork23
Copy link
Member

@jwallwork23 jwallwork23 commented Nov 23, 2024

Not strictly required for #57 but related work.

meshio and tensorboardX are never actually used in the code.

torch is used, but it should be installed for the desired architecture before attempting to install UM2N.

@jwallwork23 jwallwork23 added the install Installation instructions/process needs updating label Nov 23, 2024
@jwallwork23 jwallwork23 requested a review from ddundo November 23, 2024 11:17
@jwallwork23 jwallwork23 self-assigned this Nov 23, 2024
Copy link
Member

@ddundo ddundo left a comment

Choose a reason for hiding this comment

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

Since you're assuming that torch is preinstalled maybe it would be useful to have a check like this somewhere:

try:
    import torch
except ImportError:
    raise ImportError(
        "PyTorch is required to use this package. Please install it first."
        " Visit https://pytorch.org/get-started/locally/ for installation instructions."
    )

@jwallwork23
Copy link
Member Author

Since you're assuming that torch is preinstalled maybe it would be useful to have a check like this somewhere:

try:
    import torch
except ImportError:
    raise ImportError(
        "PyTorch is required to use this package. Please install it first."
        " Visit https://pytorch.org/get-started/locally/ for installation instructions."
    )

Good idea, thanks. Addressed in 53694d6. I tried to create a UM2N.torch module that imports torch this way so that this try/except is always hit, but it would've caused widespread changes that probably aren't worth making for the sake of this PR.

@ddundo
Copy link
Member

ddundo commented Nov 23, 2024

Looks great to me! :)

@jwallwork23 jwallwork23 merged commit 05b98e9 into main Nov 23, 2024
1 check passed
@jwallwork23 jwallwork23 deleted the fix-deps branch November 23, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install Installation instructions/process needs updating
Development

Successfully merging this pull request may close these issues.

2 participants