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

RequirementCache incorrectly returning False #17464

Closed
aamster opened this issue Apr 24, 2023 · 1 comment · Fixed by #17467
Closed

RequirementCache incorrectly returning False #17464

aamster opened this issue Apr 24, 2023 · 1 comment · Fixed by #17467
Labels
bug Something isn't working help wanted Open to be worked on logger: mlflow

Comments

@aamster
Copy link

aamster commented Apr 24, 2023

Bug description

Trying to use MLFlowLogger on kaggle. MLFlow is installed, and can be verified by

import mlflow
mlflow.__version__ # 1.30.1

However trying to instantiate MLFlowLogger gives ModuleNotFoundError: DistributionNotFound: The 'mlflow>=1.0.0' distribution was not found and is required by the application. HINT: Try running `pip install -U 'mlflow>=1.0.0'

The issue is that there is this error

from lightning_utilities.core.imports import RequirementCache
RequirementCache("mlflow>=1.0.0")
>> ContextualVersionConflict: (packaging 23.0 (/opt/conda/lib/python3.7/site-packages), Requirement.parse('packaging<22'), {'mlflow'}). HINT: Try running `pip install -U 'mlflow>=1.0.0'`

I think this is a false alarm since the library can be imported. this is preventing me from using the mlflow logger

What version are you seeing the problem on?

'1.9.5'

How to reproduce the bug

No response

Error messages and logs

# Error messages and logs here please

Environment

Current environment
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow):
#- PyTorch Lightning Version (e.g., 1.5.0):
#- Lightning App Version (e.g., 0.5.2):
#- PyTorch Version (e.g., 2.0):
#- Python version (e.g., 3.9):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):
#- Running environment of LightningApp (e.g. local, cloud):

More info

No response

@aamster aamster added bug Something isn't working needs triage Waiting to be triaged by maintainers labels Apr 24, 2023
@aamster aamster changed the title RequirementCache returning False when library can be imported RequirementCache incorrectly returning False Apr 24, 2023
@awaelchli awaelchli added logger: mlflow help wanted Open to be worked on and removed needs triage Waiting to be triaged by maintainers labels Apr 24, 2023
@aamster
Copy link
Author

aamster commented Apr 25, 2023

Thank you @carmocca for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to be worked on logger: mlflow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants