Add max deps and bump old ones
All checks were successful
Publish documentation / publish (push) Successful in 51s
Check / Test on Python 3.10 (push) Successful in 1m1s
Check / Lint, format & type checks (push) Successful in 1m9s
Check / Test on Python 3.11 (push) Successful in 51s
Check / Test on Python 3.12 (push) Successful in 58s
Check / Test on Python 3.13 (push) Successful in 55s
All checks were successful
Publish documentation / publish (push) Successful in 51s
Check / Test on Python 3.10 (push) Successful in 1m1s
Check / Lint, format & type checks (push) Successful in 1m9s
Check / Test on Python 3.11 (push) Successful in 51s
Check / Test on Python 3.12 (push) Successful in 58s
Check / Test on Python 3.13 (push) Successful in 55s
This commit is contained in:
parent
2403a20ed0
commit
c55eba2077
18 changed files with 98 additions and 75 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
from math import ceil
|
||||
from random import shuffle
|
||||
from typing import Any, Iterable, List, TypeVar, Union, cast
|
||||
|
|
@ -94,7 +94,7 @@ def add_ground_truth(
|
|||
)
|
||||
shuffle(split_tags)
|
||||
|
||||
created = datetime.utcnow().isoformat()
|
||||
created = datetime.now(timezone.utc).replace(tzinfo=None).isoformat()
|
||||
traces = [
|
||||
cast(
|
||||
Trace[T],
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
from contextvars import ContextVar
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
from time import perf_counter
|
||||
from types import TracebackType
|
||||
from typing import Any, Dict, Generic, List, Optional, Type, TypeVar, cast
|
||||
from typing import Any, Dict, Generic, List, Literal, Optional, Type, TypeVar, cast
|
||||
from uuid import uuid4
|
||||
|
||||
from typing_extensions import Literal # <= Python 3.7
|
||||
|
||||
from ..constants import DEVELOPMENT_TAG_NAME, ONLINE_TAG_NAME, PRODUCTION_TAG_NAME
|
||||
from ..context import get_context
|
||||
from ..views import Model, Trace
|
||||
|
|
@ -25,7 +23,7 @@ class TracingContext(Generic[T]):
|
|||
self._models: List[Model] = []
|
||||
self._values: Dict[str, Any] = {}
|
||||
self._trace: Optional[Trace[T]] = None
|
||||
self._start_datetime = datetime.utcnow()
|
||||
self._start_datetime = datetime.now(timezone.utc).replace(tzinfo=None)
|
||||
self._start_time = perf_counter()
|
||||
self._name = function_name
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue