-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
from typing import Any | ||
from typing import Optional | ||
|
||
|
||
@dataclasses.dataclass() |
There was a problem hiding this comment.
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
Co-authored-by: Nicole White <nicole@autoblocks.ai>
Co-authored-by: Nicole White <nicole@autoblocks.ai>
Co-authored-by: Nicole White <nicole@autoblocks.ai>
Added to description - demo of graceful exit: https://drive.google.com/file/d/1ITe8iFdXY8qBAdUb3yBOPvyfNU9iJwkv/view?usp=sharing |
6fe02dc
to
4f13876
Compare
autoblocks/_impl/tracer.py
Outdated
timestamp=timestamp, | ||
properties=merged_properties, | ||
) | ||
req = global_state.sync_http_client().post( |
There was a problem hiding this comment.
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
autoblocks/_impl/util.py
Outdated
# 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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can drop this
tests/autoblocks/test_tracer.py
Outdated
) | ||
|
||
|
||
def test_tracer_has_send_event_unsafe(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop
autoblocks/_impl/util.py
Outdated
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop
There was a problem hiding this comment.
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
tests/autoblocks/test_tracer.py
Outdated
os.environ, | ||
{ | ||
"AUTOBLOCKS_INGESTION_KEY": "mock-ingestion-key", | ||
"TRACER_BLOCK_ON_SEND_EVENT": "1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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 intracer.py
Graceful exit demonstration: https://drive.google.com/file/d/1ITe8iFdXY8qBAdUb3yBOPvyfNU9iJwkv/view?usp=sharing