mirror of
https://github.com/clearml/clearml
synced 2025-02-07 13:23:40 +00:00
Add support for development.worker.report_start_sec to allow starting resource monitoring sooner than usual
This commit is contained in:
parent
295280cb93
commit
c2b6165987
@ -205,6 +205,9 @@
|
||||
# compatibility feature, report memory usage for the entire machine
|
||||
# default (false), report only on the running process and its sub-processes
|
||||
report_global_mem_used: false
|
||||
|
||||
# if provided, start resource reporting after this amount of seconds
|
||||
#report_start_sec: 30
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -702,8 +702,10 @@ class Task(_Task):
|
||||
resource_monitor_cls = auto_resource_monitoring \
|
||||
if isinstance(auto_resource_monitoring, six.class_types) else ResourceMonitor
|
||||
task._resource_monitor = resource_monitor_cls(
|
||||
task, report_mem_used_per_process=not config.get(
|
||||
'development.worker.report_global_mem_used', False))
|
||||
task,
|
||||
report_mem_used_per_process=not config.get('development.worker.report_global_mem_used', False),
|
||||
first_report_sec=config.get('development.worker.report_start_sec', None),
|
||||
)
|
||||
task._resource_monitor.start()
|
||||
|
||||
# make sure all random generators are initialized with new seed
|
||||
|
Loading…
Reference in New Issue
Block a user