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

Commit

Permalink
Fixes #120: version check for TF and sklearn
Browse files Browse the repository at this point in the history
  • Loading branch information
terrytangyuan committed Mar 5, 2016
1 parent 5a4dd31 commit b0cddab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions skflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@
from skflow.io import data_feeder
from skflow import models
from skflow.trainer import TensorFlowTrainer

import pkg_resources as pkg_rs

__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 float(sklearn_version) < 0.16:
raise ImportError("Your scikit-learn version needs to be at least 0.16. ")
if float(tensorflow_version[0:3]) < 0.7:
raise ImportError("Your tensorflow version needs to be at least 0.7. ")

0 comments on commit b0cddab

Please sign in to comment.