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

Remove conditional import of Classifier #185

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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