Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Minor changes to version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
terrytangyuan committed Mar 6, 2016
1 parent eb06eb2 commit 21cf932
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions skflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@
from skflow import models
from skflow.trainer import TensorFlowTrainer

__version__, SKLEARN_VERSION, TF_VERSION = \
[pkg_rs.get_distribution(pkg).version for pkg in ['skflow', 'scikit-learn', 'tensorflow']]

__version__ = pkg_rs.get_distribution("skflow").version

sklearn_version = pkg_rs.get_distribution("scikit-learn").version
tensorflow_version = pkg_rs.get_distribution("tensorflow").version

if sklearn_version < '0.16.0':
if SKLEARN_VERSION < '0.16.0':
raise ImportError("Your scikit-learn version needs to be at least 0.16. ")
if tensorflow_version < '0.7.0':
if TF_VERSION < '0.7.0':
raise ImportError("Your tensorflow version needs to be at least 0.7. ")

0 comments on commit 21cf932

Please sign in to comment.