From c3eb5fd8b0491f85c50e0a94351140fc8a45f8a4 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Sat, 6 Jul 2019 22:59:56 +0300 Subject: [PATCH] Add new API backward compatibility support --- trains/logger.py | 4 ++-- trains/model.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/trains/logger.py b/trains/logger.py index 33b5eac9..d4d300c4 100644 --- a/trains/logger.py +++ b/trains/logger.py @@ -12,7 +12,7 @@ from .backend_interface.task.development.worker import DevWorker from .backend_interface.task.log import TaskHandler from .storage import StorageHelper from .utilities.plotly_reporter import SeriesInfo -from .backend_interface import TaskStatusEnum +from .backend_api.services import tasks from .backend_interface.task import Task as _Task from .config import running_remotely, get_cache_dir @@ -605,7 +605,7 @@ class Logger(object): pass def _start_task_if_needed(self): - if self._task._status == TaskStatusEnum.created: + if self._task._status == tasks.TaskStatusEnum.created: self._task.mark_started() self._task._dev_mode_task_start() diff --git a/trains/model.py b/trains/model.py index d599db9e..fca2944c 100644 --- a/trains/model.py +++ b/trains/model.py @@ -16,7 +16,7 @@ from .debugging.log import get_logger from .storage import StorageHelper from .utilities.enum import Options from .backend_interface import Task as _Task -from .backend_interface.model import Model as _Model, DummyModel as _DummyModel +from .backend_interface.model import create_dummy_model, Model as _Model from .config import running_remotely, get_cache_dir ARCHIVED_TAG = "archived" @@ -643,7 +643,7 @@ class OutputModel(BaseModel): self._model_local_filename = None self._base_model = None - self._floating_data = _DummyModel( + self._floating_data = create_dummy_model( design=_Model._wrap_design(config_text), labels=label_enumeration or task.get_labels_enumeration(), name=name,