-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
Environment Details
Please indicate the following details about the environment in which you found the bug:
- SDMetrics version: 0.20.0
- Python version:
- Operating System:
Error Description
Torch is being imported in the file below after this change. Since it isn't listed as a required dependency, it crashes whenever you import from sdmetrics unless you happened to already have torch installed.
import torch |
Steps to reproduce
- Create a new environment
- Install sdmetrics and nothing else
- Run
import sdmetrics
Additional Context
- We should wrap the importing of torch in a try/catch like we do here
SDMetrics/sdmetrics/timeseries/ml_scorers.py
Lines 28 to 33 in 89f2df2
def lstm_classifier(X_train, X_test, y_train, y_test): """ML Scorer based on a simple LSTM based NN implemented using torch.""" try: import torch except ImportError: raise ImportError('Please install torch with `pip install torch`') - We should add an install test workflow like we have here
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working