mirror of
https://github.com/clearml/clearml-server
synced 2025-02-07 05:27:23 +00:00
Do not drop service request num to 0 on the chart for the periods when serving model was not reporting
This commit is contained in:
parent
8c29ebaece
commit
b7795b3e2e
@ -270,15 +270,20 @@ class ServingStats:
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
hist_params = {}
|
||||||
|
if metric_type == MetricType.requests:
|
||||||
|
hist_params["min_doc_count"] = 1
|
||||||
|
else:
|
||||||
|
hist_params["extended_bounds"] = {
|
||||||
|
"min": int(from_date) * 1000,
|
||||||
|
"max": int(to_date) * 1000,
|
||||||
|
}
|
||||||
aggs = {
|
aggs = {
|
||||||
"dates": {
|
"dates": {
|
||||||
"date_histogram": {
|
"date_histogram": {
|
||||||
"field": "timestamp",
|
"field": "timestamp",
|
||||||
"fixed_interval": f"{interval}s",
|
"fixed_interval": f"{interval}s",
|
||||||
"extended_bounds": {
|
**hist_params,
|
||||||
"min": int(from_date) * 1000,
|
|
||||||
"max": int(to_date) * 1000,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"aggs": aggs,
|
"aggs": aggs,
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from typing import Sequence, Tuple, Any, Union, Callable, Optional, Mapping
|
from typing import Sequence, Tuple, Any, Union, Callable, Optional, Protocol
|
||||||
|
|
||||||
|
|
||||||
def flatten_nested_items(
|
def flatten_nested_items(
|
||||||
@ -35,8 +35,13 @@ def deep_merge(source: dict, override: dict) -> dict:
|
|||||||
return source
|
return source
|
||||||
|
|
||||||
|
|
||||||
|
class GetItem(Protocol):
|
||||||
|
def __getitem__(self, key: Any) -> Any:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def nested_get(
|
def nested_get(
|
||||||
dictionary: Mapping,
|
dictionary: GetItem,
|
||||||
path: Sequence[str],
|
path: Sequence[str],
|
||||||
default: Optional[Union[Any, Callable]] = None,
|
default: Optional[Union[Any, Callable]] = None,
|
||||||
) -> Any:
|
) -> Any:
|
||||||
|
Loading…
Reference in New Issue
Block a user