Add ground_truth API and refactor
This commit is contained in:
parent
c5cafbee47
commit
421f9bb726
1 changed files with 409 additions and 211 deletions
|
|
@ -1,13 +1,12 @@
|
|||
import inspect
|
||||
from typing import Any
|
||||
|
||||
from great_ai.great_ai.context.get_context import get_context
|
||||
|
||||
from ..tracing.tracing_context import TracingContext
|
||||
from ..context import get_context
|
||||
from ..tracing import TracingContext
|
||||
|
||||
|
||||
def log_metric(argument_name: str, value: Any) -> None:
|
||||
tracing_context = TracingContext.get_current_context()
|
||||
tracing_context = TracingContext.get_current_tracing_context()
|
||||
caller = inspect.stack()[1].function
|
||||
actual_name = f"metric:{caller}:{argument_name}"
|
||||
if tracing_context:
|
||||
|
|
|
|||
Loading…
Reference in a new issue