Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPD-612: Evaluations with AutoblocksTracer #124

Merged
merged 27 commits into from
Mar 5, 2024

Conversation

dmorton2297
Copy link
Contributor

@dmorton2297 dmorton2297 commented Feb 26, 2024

Description

Updated tracer to accept evaluators as top level property, then execute them.

Note: I am planning on creating a folder for tracer under _impl directory. I have held off on doing this to make the diff easier to look over during the initial reviews, I will add this change once I get the majority of feedback on the changes in tracer.py

Graceful exit demonstration: https://drive.google.com/file/d/1ITe8iFdXY8qBAdUb3yBOPvyfNU9iJwkv/view?usp=sharing

from typing import Any
from typing import Optional


@dataclasses.dataclass()
Copy link
Contributor Author

@dmorton2297 dmorton2297 Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is temporarily here - I am going to create a tracer folder under _impl that contains its own models + tracer implementation, but have held off to make the diff easier to review

@dmorton2297 dmorton2297 changed the title EPD-612: Evaluators in tracer POC EDP-612: Evaluations with AutoblocksTracer Feb 26, 2024
@dmorton2297 dmorton2297 marked this pull request as ready for review February 26, 2024 22:13
dmorton2297 and others added 3 commits February 26, 2024 16:29
Co-authored-by: Nicole White <nicole@autoblocks.ai>
Co-authored-by: Nicole White <nicole@autoblocks.ai>
Co-authored-by: Nicole White <nicole@autoblocks.ai>
@dmorton2297 dmorton2297 requested a review from nicolewhite March 4, 2024 16:10
@dmorton2297
Copy link
Contributor Author

Added to description - demo of graceful exit: https://drive.google.com/file/d/1ITe8iFdXY8qBAdUb3yBOPvyfNU9iJwkv/view?usp=sharing

tests/e2e/test_e2e.py Outdated Show resolved Hide resolved
tests/e2e/test_e2e.py Outdated Show resolved Hide resolved
tests/e2e/test_e2e.py Outdated Show resolved Hide resolved
tests/e2e/test_e2e.py Outdated Show resolved Hide resolved
tests/e2e/test_e2e.py Outdated Show resolved Hide resolved
@dmorton2297 dmorton2297 force-pushed the dan/epd-612-evals-python-sdk-imp branch from 6fe02dc to 4f13876 Compare March 5, 2024 15:34
timestamp=timestamp,
properties=merged_properties,
)
req = global_state.sync_http_client().post(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to switch back to the async client + drop sync_http_client

# This constant is used during the shutdown process to find all outstanding
# send event tasks and attempt to resolved them before stopping the event loop.
# We have a test asserting that this function name does not change.
SEND_EVENT_CORO_NAME = "_send_event_unsafe"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can drop this

)


def test_tracer_has_send_event_unsafe():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop

@@ -22,6 +27,7 @@ class AutoblocksEnvVar(StrEnum):
CLI_SERVER_ADDRESS = "AUTOBLOCKS_CLI_SERVER_ADDRESS"
INGESTION_KEY = "AUTOBLOCKS_INGESTION_KEY"
TRACER_THROW_ON_ERROR = "AUTOBLOCKS_TRACER_THROW_ON_ERROR"
TRACER_BLOCK_ON_SEND_EVENT = "TRACER_BLOCK_ON_SEND_EVENT"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also this should be prefixed with AUTOBLOCKS_ like all the rest

os.environ,
{
"AUTOBLOCKS_INGESTION_KEY": "mock-ingestion-key",
"TRACER_BLOCK_ON_SEND_EVENT": "1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop

Copy link
Contributor

@nicolewhite nicolewhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmorton2297 dmorton2297 merged commit 226b6fa into main Mar 5, 2024
5 checks passed
@dmorton2297 dmorton2297 deleted the dan/epd-612-evals-python-sdk-imp branch March 5, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants