This commit is contained in:
allegroai 2022-01-15 23:03:20 +02:00
parent b3176a223b
commit 097bf23481
6 changed files with 8 additions and 8 deletions

View File

@ -98,7 +98,7 @@ class DatasetTrigger(BaseTrigger):
if self.on_archive:
system_tags = list(set(query.get('system_tags', []) + ['archived']))
query.update({'system_tags': system_tags})
return query

View File

@ -1,7 +1,6 @@
import abc
import jsonschema
import os
import six
from .apimodel import ApiModel
@ -14,9 +13,10 @@ if ENV_API_DEFAULT_REQ_METHOD.exists() and ENV_API_DEFAULT_REQ_METHOD.get().uppe
"CLEARML_API_DEFAULT_REQ_METHOD environment variable must be 'get' or 'post' (any case is allowed)."
)
class Request(ApiModel):
_method = ENV_API_DEFAULT_REQ_METHOD.get(default="get")
def __init__(self, **kwargs):
allow_extra_fields = kwargs.pop("_allow_extra_fields_", False)
if not allow_extra_fields and kwargs:

View File

@ -1,5 +1,4 @@
import json as json_lib
import os
import sys
import types
from socket import gethostname

View File

@ -1,6 +1,5 @@
import abc
import hashlib
import os
import time
from functools import reduce
from logging import getLevelName

View File

@ -82,7 +82,7 @@ class BackgroundLogService(BackgroundMonitor):
def add_to_queue(self, record):
# check that we did not loose the reporter sub-process
if self.is_subprocess_mode() and not self._fast_is_subprocess_alive() and not self.get_at_exit_state(): ##HANGS IF RACE HOLDS!
if self.is_subprocess_mode() and not self._fast_is_subprocess_alive() and not self.get_at_exit_state(): # HANGS IF RACE HOLDS!
# we lost the reporting subprocess, let's switch to thread mode
# gel all data, work on local queue:
self.send_all_records()

View File

@ -692,8 +692,10 @@ class BackgroundMonitor(object):
if self.get_at_exit_state():
return self.is_subprocess_alive() and self._thread
return self.is_subprocess_alive() and self._thread and \
self._start_ev.is_set() and not self._done_ev.is_set()
return self.is_subprocess_alive() and \
self._thread and \
self._start_ev.is_set() and \
not self._done_ev.is_set()
@classmethod
def _fast_is_subprocess_alive(cls):