Skip to content

Commit

Permalink
Merge pull request #185 from delta2323/remove-conditional-import-of-c…
Browse files Browse the repository at this point in the history
…lassifier

Remove conditional import of Classifier
  • Loading branch information
corochann committed Jun 10, 2018
2 parents e09773c + 36923c6 commit 5b0019d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 32 deletions.
9 changes: 1 addition & 8 deletions examples/qm9/predict_qm9.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@
import numpy # NOQA

from chainer_chemistry import datasets as D
try:
from chainer_chemistry.models.prediction import Regressor
except ImportError:
print('[ERROR] This example uses newly implemented `Regressor` class.\n'
'Please install the library from master branch.\n See '
'https://github.com/pfnet-research/chainer-chemistry#installation'
' for detail.')
exit()
from chainer_chemistry.models.prediction import Regressor
from chainer_chemistry.dataset.converters import concat_mols
from chainer_chemistry.dataset.preprocessors import preprocess_method_dict
from chainer_chemistry.datasets import NumpyTupleDataset
Expand Down
9 changes: 1 addition & 8 deletions examples/qm9/train_qm9.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@

from chainer_chemistry import datasets as D
from chainer_chemistry.models import MLP, NFP, GGNN, SchNet, WeaveNet, RSGCN # NOQA
try:
from chainer_chemistry.models.prediction import Regressor
except ImportError:
print('[ERROR] This example uses newly implemented `Regressor` class.\n'
'Please install the library from master branch.\n See '
'https://github.com/pfnet-research/chainer-chemistry#installation'
' for detail.')
exit()
from chainer_chemistry.models.prediction import Regressor
from chainer_chemistry.dataset.converters import concat_mols
from chainer_chemistry.dataset.preprocessors import preprocess_method_dict
from chainer_chemistry.datasets import NumpyTupleDataset
Expand Down
9 changes: 1 addition & 8 deletions examples/tox21/predict_tox21_with_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@
import six

from chainer_chemistry.dataset.converters import concat_mols
try:
from chainer_chemistry.models.prediction import Classifier
except ImportError:
print('[ERROR] This example uses newly implemented `Classifier` class.\n'
'Please install the library from master branch.\n See '
'https://github.com/pfnet-research/chainer-chemistry#installation'
' for detail.')
exit()
from chainer_chemistry.models.prediction import Classifier
from chainer_chemistry.training.extensions.roc_auc_evaluator import ROCAUCEvaluator # NOQA

import data
Expand Down
9 changes: 1 addition & 8 deletions examples/tox21/train_tox21.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@
from chainer_chemistry import datasets as D
from chainer_chemistry.iterators.balanced_serial_iterator import BalancedSerialIterator # NOQA
from chainer_chemistry.training.extensions import ROCAUCEvaluator # NOQA
try:
from chainer_chemistry.models.prediction import Classifier
except ImportError:
print('[ERROR] This example uses newly implemented `Classifier` class.\n'
'Please install the library from master branch.\n See '
'https://github.com/pfnet-research/chainer-chemistry#installation'
' for detail.')
exit()
from chainer_chemistry.models.prediction import Classifier

import data
import predictor
Expand Down

0 comments on commit 5b0019d

Please sign in to comment.