Skip to content

Commit

Permalink
fix tracing mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
mike0sv committed Jul 11, 2024
1 parent 80c9f88 commit 8c71e3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/evidently/tracing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.sdk.trace.export import SpanExporter
from requests import Response

from evidently.ui.workspace.cloud import ACCESS_TOKEN_COOKIE
from evidently.ui.workspace.cloud import CloudMetadataStorage
Expand Down Expand Up @@ -107,14 +108,15 @@ def _create_tracer_provider(
)

cloud = CloudMetadataStorage(_address, _api_key, ACCESS_TOKEN_COOKIE.key)
datasets = cloud._request("/api/datasets", "GET").json()["datasets"]
datasets_response: Response = cloud._request("/api/datasets", "GET")
datasets = datasets_response.json()["datasets"]
_export_id = None
for dataset in datasets:
if dataset["name"] == _export_name:
_export_id = dataset["id"]
break
if _export_id is None:
resp = cloud._request(
resp: Response = cloud._request(
"/api/datasets/tracing",
"POST",
query_params={"team_id": _team_id},
Expand Down

0 comments on commit 8c71e3b

Please sign in to comment.