Fix PY2 compatibility issue

This commit is contained in:
allegroai 2021-09-17 16:17:43 +03:00
parent 889d237398
commit 51d70efbff

View File

@ -1,4 +1,5 @@
""" ClearML open SDK """
from six import PY2
from .version import __version__
from .task import Task
@ -7,7 +8,31 @@ from .logger import Logger
from .storage import StorageManager
from .errors import UsageError
from .datasets import Dataset
from .automation.controller import PipelineController
__all__ = ["__version__", "Task", "InputModel", "OutputModel", "Model", "Logger",
"StorageManager", "UsageError", "Dataset", "PipelineController"]
if not PY2:
from .automation.controller import PipelineController
__all__ = [
"__version__",
"Task",
"InputModel",
"OutputModel",
"Model",
"Logger",
"StorageManager",
"UsageError",
"Dataset",
"PipelineController",
]
else:
__all__ = [
"__version__",
"Task",
"InputModel",
"OutputModel",
"Model",
"Logger",
"StorageManager",
"UsageError",
"Dataset",
]