From 7ae7cb1fd7938616c5610c8faaf20b7b564711eb Mon Sep 17 00:00:00 2001 From: Lai Wei Date: Fri, 5 Apr 2019 13:58:38 -0700 Subject: [PATCH] move to gluon contrib (#14635) --- python/mxnet/{ => gluon}/contrib/estimator/__init__.py | 0 python/mxnet/{ => gluon}/contrib/estimator/estimator.py | 6 +++--- python/mxnet/{ => gluon}/contrib/estimator/event_handler.py | 0 tests/nightly/estimator/test_estimator_cnn.py | 2 +- tests/nightly/estimator/test_sentiment_rnn.py | 2 +- tests/python/unittest/test_gluon_estimator.py | 2 +- tests/python/unittest/test_gluon_event_handler.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename python/mxnet/{ => gluon}/contrib/estimator/__init__.py (100%) rename python/mxnet/{ => gluon}/contrib/estimator/estimator.py (99%) rename python/mxnet/{ => gluon}/contrib/estimator/event_handler.py (100%) diff --git a/python/mxnet/contrib/estimator/__init__.py b/python/mxnet/gluon/contrib/estimator/__init__.py similarity index 100% rename from python/mxnet/contrib/estimator/__init__.py rename to python/mxnet/gluon/contrib/estimator/__init__.py diff --git a/python/mxnet/contrib/estimator/estimator.py b/python/mxnet/gluon/contrib/estimator/estimator.py similarity index 99% rename from python/mxnet/contrib/estimator/estimator.py rename to python/mxnet/gluon/contrib/estimator/estimator.py index 529499129df8..f7c97c43cd4b 100644 --- a/python/mxnet/contrib/estimator/estimator.py +++ b/python/mxnet/gluon/contrib/estimator/estimator.py @@ -22,9 +22,9 @@ import copy import warnings from .event_handler import EventHandler, LoggingHandler -from ... import gluon, autograd -from ...context import Context, cpu, gpu, num_gpus -from ...metric import EvalMetric, Loss, Accuracy +from .... import gluon, autograd +from ....context import Context, cpu, gpu, num_gpus +from ....metric import EvalMetric, Loss, Accuracy __all__ = ['Estimator'] diff --git a/python/mxnet/contrib/estimator/event_handler.py b/python/mxnet/gluon/contrib/estimator/event_handler.py similarity index 100% rename from python/mxnet/contrib/estimator/event_handler.py rename to python/mxnet/gluon/contrib/estimator/event_handler.py diff --git a/tests/nightly/estimator/test_estimator_cnn.py b/tests/nightly/estimator/test_estimator_cnn.py index 92d7889ac622..7d0018b0eedd 100644 --- a/tests/nightly/estimator/test_estimator_cnn.py +++ b/tests/nightly/estimator/test_estimator_cnn.py @@ -22,7 +22,7 @@ import mxnet as mx from mxnet import gluon, init, nd from mxnet.gluon import data -from mxnet.contrib.estimator import estimator +from mxnet.gluon.contrib.estimator import estimator from mxnet.gluon.model_zoo import vision def load_data_mnist(batch_size, resize=None, num_workers=4): diff --git a/tests/nightly/estimator/test_sentiment_rnn.py b/tests/nightly/estimator/test_sentiment_rnn.py index 89b677852723..5fd93c1286fa 100644 --- a/tests/nightly/estimator/test_sentiment_rnn.py +++ b/tests/nightly/estimator/test_sentiment_rnn.py @@ -29,7 +29,7 @@ from mxnet import nd, gluon from mxnet.contrib import text from mxnet.gluon import nn, rnn -from mxnet.contrib.estimator import estimator +from mxnet.gluon.contrib.estimator import estimator class TextCNN(nn.Block): diff --git a/tests/python/unittest/test_gluon_estimator.py b/tests/python/unittest/test_gluon_estimator.py index fd6693d7bd54..13fcd960d439 100644 --- a/tests/python/unittest/test_gluon_estimator.py +++ b/tests/python/unittest/test_gluon_estimator.py @@ -24,7 +24,7 @@ import mxnet as mx from mxnet import gluon from mxnet.gluon import nn -from mxnet.contrib.estimator import Estimator, EventHandler +from mxnet.gluon.contrib.estimator import Estimator, EventHandler from nose.tools import assert_raises diff --git a/tests/python/unittest/test_gluon_event_handler.py b/tests/python/unittest/test_gluon_event_handler.py index f3181f5e4f23..dd2e60d43f2b 100644 --- a/tests/python/unittest/test_gluon_event_handler.py +++ b/tests/python/unittest/test_gluon_event_handler.py @@ -20,7 +20,7 @@ import mxnet as mx from mxnet import nd from mxnet.gluon import nn, loss -from mxnet.contrib.estimator import estimator, event_handler +from mxnet.gluon.contrib.estimator import estimator, event_handler def _get_test_network(): net = nn.Sequential()