mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Fix linter issues
This commit is contained in:
parent
028a835676
commit
cc875f0fbe
@ -20,6 +20,7 @@ except ImportError as err:
|
|||||||
"install with: pip install boto3"
|
"install with: pip install boto3"
|
||||||
) from err
|
) from err
|
||||||
|
|
||||||
|
|
||||||
@attr.s
|
@attr.s
|
||||||
class AWSDriver(CloudDriver):
|
class AWSDriver(CloudDriver):
|
||||||
"""AWS Driver"""
|
"""AWS Driver"""
|
||||||
@ -59,7 +60,7 @@ class AWSDriver(CloudDriver):
|
|||||||
launch_specification = ConfigFactory.from_dict(
|
launch_specification = ConfigFactory.from_dict(
|
||||||
{
|
{
|
||||||
"ImageId": resource_conf["ami_id"],
|
"ImageId": resource_conf["ami_id"],
|
||||||
"Monitoring": {'Enabled':bool(resource_conf.get('enable_monitoring', False))},
|
"Monitoring": {'Enabled': bool(resource_conf.get('enable_monitoring', False))},
|
||||||
"InstanceType": resource_conf["instance_type"],
|
"InstanceType": resource_conf["instance_type"],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,6 @@ import itertools
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
from copy import copy
|
from copy import copy
|
||||||
@ -34,12 +33,12 @@ from ...backend_interface.task.development.worker import DevWorker
|
|||||||
from ...backend_interface.session import SendError
|
from ...backend_interface.session import SendError
|
||||||
from ...backend_api import Session
|
from ...backend_api import Session
|
||||||
from ...backend_api.services import tasks, models, events, projects
|
from ...backend_api.services import tasks, models, events, projects
|
||||||
from ...backend_api.session.defs import ENV_OFFLINE_MODE
|
# from ...backend_api.session.defs import ENV_OFFLINE_MODE
|
||||||
from ...utilities.pyhocon import ConfigTree, ConfigFactory
|
from ...utilities.pyhocon import ConfigTree, ConfigFactory
|
||||||
from ...utilities.config import config_dict_to_text, text_to_config_dict
|
from ...utilities.config import config_dict_to_text, text_to_config_dict
|
||||||
from ...errors import ArtifactUriDeleteError
|
from ...errors import ArtifactUriDeleteError
|
||||||
|
|
||||||
from ..base import IdObjectBase, InterfaceBase
|
from ..base import IdObjectBase # , InterfaceBase
|
||||||
from ..metrics import Metrics, Reporter
|
from ..metrics import Metrics, Reporter
|
||||||
from ..model import Model
|
from ..model import Model
|
||||||
from ..setupuploadmixin import SetupUploadMixin
|
from ..setupuploadmixin import SetupUploadMixin
|
||||||
@ -376,7 +375,6 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
self._edit(type=tasks.TaskTypeEnum(task_type))
|
self._edit(type=tasks.TaskTypeEnum(task_type))
|
||||||
return id
|
return id
|
||||||
|
|
||||||
|
|
||||||
def _set_storage_uri(self, value):
|
def _set_storage_uri(self, value):
|
||||||
value = value.rstrip('/') if value else None
|
value = value.rstrip('/') if value else None
|
||||||
self._storage_uri = StorageHelper.conform_url(value)
|
self._storage_uri = StorageHelper.conform_url(value)
|
||||||
|
@ -70,7 +70,7 @@ class PatchGradio:
|
|||||||
# noinspection PyBroadException
|
# noinspection PyBroadException
|
||||||
try:
|
try:
|
||||||
return original_fn(*args, **kwargs)
|
return original_fn(*args, **kwargs)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
del kwargs["root_path"]
|
del kwargs["root_path"]
|
||||||
return original_fn(*args, **kwargs)
|
return original_fn(*args, **kwargs)
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ def parse_known_host(parsed_host):
|
|||||||
print('Assuming files and api ports are unchanged and use the same (' + parsed_host.scheme + ') protocol')
|
print('Assuming files and api ports are unchanged and use the same (' + parsed_host.scheme + ') protocol')
|
||||||
api_host = parsed_host.scheme + "://" + parsed_host.netloc + ':8008' + parsed_host.path
|
api_host = parsed_host.scheme + "://" + parsed_host.netloc + ':8008' + parsed_host.path
|
||||||
web_host = parsed_host.scheme + "://" + parsed_host.netloc + parsed_host.path
|
web_host = parsed_host.scheme + "://" + parsed_host.netloc + parsed_host.path
|
||||||
files_host = parsed_host.scheme + "://" + parsed_host.netloc+ ':8081' + parsed_host.path
|
files_host = parsed_host.scheme + "://" + parsed_host.netloc + ':8081' + parsed_host.path
|
||||||
else:
|
else:
|
||||||
print("Warning! Could not parse host name")
|
print("Warning! Could not parse host name")
|
||||||
api_host = ''
|
api_host = ''
|
||||||
|
@ -116,6 +116,7 @@ class _Driver(object):
|
|||||||
cls._file_server_hosts = hosts
|
cls._file_server_hosts = hosts
|
||||||
return cls._file_server_hosts
|
return cls._file_server_hosts
|
||||||
|
|
||||||
|
|
||||||
class _HttpDriver(_Driver):
|
class _HttpDriver(_Driver):
|
||||||
""" LibCloud http/https adapter (simple, enough for now) """
|
""" LibCloud http/https adapter (simple, enough for now) """
|
||||||
|
|
||||||
@ -1797,7 +1798,6 @@ class _FileStorageDriver(_Driver):
|
|||||||
return os.path.isfile(object_name)
|
return os.path.isfile(object_name)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class StorageHelper(object):
|
class StorageHelper(object):
|
||||||
""" Storage helper.
|
""" Storage helper.
|
||||||
Used by the entire system to download/upload files.
|
Used by the entire system to download/upload files.
|
||||||
@ -2976,7 +2976,6 @@ class StorageHelper(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def normalize_local_path(local_path):
|
def normalize_local_path(local_path):
|
||||||
"""
|
"""
|
||||||
Get a normalized local path
|
Get a normalized local path
|
||||||
|
Loading…
Reference in New Issue
Block a user