mirror of
https://github.com/clearml/clearml
synced 2025-04-20 06:15:00 +00:00
Allow disabling repository detection when calling Task.init()
This commit is contained in:
parent
4bca5ccf27
commit
888c53f67d
@ -46,7 +46,7 @@ class StdStreamPatch(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# now check if we have loguru and make it re-register the handlers
|
# now check if we have loguru and make it re-register the handlers
|
||||||
# because it sores internally the stream.write function, which we cant patch
|
# because it stores internally the stream.write function, which we cant patch
|
||||||
# noinspection PyBroadException
|
# noinspection PyBroadException
|
||||||
try:
|
try:
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
@ -170,7 +170,7 @@ class Task(_Task):
|
|||||||
Fine grained control is possible by passing a dictionary instead of a Boolean.
|
Fine grained control is possible by passing a dictionary instead of a Boolean.
|
||||||
Missing keys are considered to have True value, empty dictionary is considered as False, full example:
|
Missing keys are considered to have True value, empty dictionary is considered as False, full example:
|
||||||
auto_connect_frameworks={'matplotlib': True, 'tensorflow': True, 'pytorch': True,
|
auto_connect_frameworks={'matplotlib': True, 'tensorflow': True, 'pytorch': True,
|
||||||
'xgboost': True, 'scikit': True}
|
'xgboost': True, 'scikit': True, 'detect_repository': True}
|
||||||
:param auto_resource_monitoring: If true, machine vitals will be sent along side the task scalars,
|
:param auto_resource_monitoring: If true, machine vitals will be sent along side the task scalars,
|
||||||
Resources graphs will appear under the title ':resource monitor:' in the scalars tab.
|
Resources graphs will appear under the title ':resource monitor:' in the scalars tab.
|
||||||
:return: Task() object
|
:return: Task() object
|
||||||
@ -956,7 +956,8 @@ class Task(_Task):
|
|||||||
task._dev_worker = None
|
task._dev_worker = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _create_dev_task(cls, default_project_name, default_task_name, default_task_type, reuse_last_task_id):
|
def _create_dev_task(cls, default_project_name, default_task_name, default_task_type, reuse_last_task_id,
|
||||||
|
detect_repo=True):
|
||||||
if not default_project_name or not default_task_name:
|
if not default_project_name or not default_task_name:
|
||||||
# get project name and task name from repository name and entry_point
|
# get project name and task name from repository name and entry_point
|
||||||
result, _ = ScriptInfo.get(create_requirements=False, check_uncommitted=False)
|
result, _ = ScriptInfo.get(create_requirements=False, check_uncommitted=False)
|
||||||
@ -1066,6 +1067,7 @@ class Task(_Task):
|
|||||||
logger.report_text('TRAINS Task: created new task id=%s' % task.id)
|
logger.report_text('TRAINS Task: created new task id=%s' % task.id)
|
||||||
|
|
||||||
# update current repository and put warning into logs
|
# update current repository and put warning into logs
|
||||||
|
if detect_repo:
|
||||||
if in_dev_mode and cls.__detect_repo_async:
|
if in_dev_mode and cls.__detect_repo_async:
|
||||||
task._detect_repo_async_thread = threading.Thread(target=task._update_repository)
|
task._detect_repo_async_thread = threading.Thread(target=task._update_repository)
|
||||||
task._detect_repo_async_thread.daemon = True
|
task._detect_repo_async_thread.daemon = True
|
||||||
|
Loading…
Reference in New Issue
Block a user