提交 7c40324b 编写于 作者: C ceci3

fix for py3

上级 95a95672
...@@ -11,10 +11,7 @@ ...@@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import flops as flops_module from .flops import flops
from flops import * from .model_size import model_size
import model_size as model_size_module
from model_size import * __all__ = ['flops', 'model_size']
__all__ = []
__all__ += flops_module.__all__
__all__ += model_size_module.__all__
...@@ -11,25 +11,15 @@ ...@@ -11,25 +11,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import controller from .controller import EvolutionaryController
from controller import * from .sa_controller import SAController
import sa_controller from .log_helper import get_logger
from sa_controller import * from .controller_server import ControllerServer
import log_helper from .controller_client import ControllerClient
from log_helper import * from .lock_utils import lock, unlock
import controller_server from .cached_reader import cached_reader
from controller_server import *
import controller_client
from controller_client import *
import lock_utils
from lock_utils import *
import cached_reader as cached_reader_module
from cached_reader import *
__all__ = [] __all__ = [
__all__ += controller.__all__ 'EvolutionaryController', 'SAController', 'get_logger', 'ControllerServer',
__all__ += sa_controller.__all__ 'ControllerClient', 'lock', 'unlock', 'cached_reader'
__all__ += controller_server.__all__ ]
__all__ += controller_client.__all__
__all__ += lock_utils.__all__
__all__ += cached_reader_module.__all__
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
import logging import logging
import socket import socket
from log_helper import get_logger from .log_helper import get_logger
__all__ = ['ControllerClient'] __all__ = ['ControllerClient']
......
...@@ -107,7 +107,7 @@ class ControllerServer(object): ...@@ -107,7 +107,7 @@ class ControllerServer(object):
_logger.debug("send message to {}: [{}]".format(addr, _logger.debug("send message to {}: [{}]".format(addr,
tokens)) tokens))
conn.close() conn.close()
except Exception, err: except Exception as err:
_logger.error(err) _logger.error(err)
finally: finally:
self._socket_server.close() self._socket_server.close()
......
...@@ -18,7 +18,7 @@ import math ...@@ -18,7 +18,7 @@ import math
import logging import logging
import numpy as np import numpy as np
from .controller import EvolutionaryController from .controller import EvolutionaryController
from log_helper import get_logger from .log_helper import get_logger
__all__ = ["SAController"] __all__ = ["SAController"]
......
...@@ -12,11 +12,7 @@ ...@@ -12,11 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import search_space from .search_space import *
from search_space import * from .sa_nas import SANAS
import sa_nas
from sa_nas import *
__all__ = [] __all__ = ['SANAS']
__all__ += search_space.__all__
__all__ += sa_nas.__all__
...@@ -12,21 +12,14 @@ ...@@ -12,21 +12,14 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import mobilenetv2 from .mobilenetv2 import MobileNetV2Space
from .mobilenetv2 import * from .mobilenetv1 import MobileNetV1Space
import mobilenetv1 from .resnet import ResNetSpace
from .mobilenetv1 import * from .search_space_registry import SEARCHSPACE
import resnet from .search_space_factory import SearchSpaceFactory
from .resnet import * from .search_space_base import SearchSpaceBase
import search_space_registry
from search_space_registry import *
import search_space_factory
from search_space_factory import *
import search_space_base
from search_space_base import *
__all__ = [] __all__ = [
__all__ += mobilenetv2.__all__ 'MobileNetV1Space', 'MobileNetV2Space', 'ResNetSpace', 'SearchSpaceBase',
__all__ += search_space_registry.__all__ 'SearchSpaceFactory', 'SEARCHSPACE'
__all__ += search_space_factory.__all__ ]
__all__ += search_space_base.__all__
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册