Skip to content

Conversation

tiffzhao5
Copy link
Contributor

@tiffzhao5 tiffzhao5 commented Feb 1, 2024

Pull Request Summary

Logging post inference hook to firehose stream.

Test Plan and Usage Guide

Runs successfully locally. Load test of 1000 requests success (finished in < 1min and all show up in table).

Copy link

This pull request has been linked to Shortcut Story #835062: Implement post_inference_hook to write to firehose.

@tiffzhao5 tiffzhao5 marked this pull request as ready for review February 2, 2024 19:29
@tiffzhao5 tiffzhao5 requested review from song-william and a team February 2, 2024 19:30
Copy link
Contributor

@song-william song-william left a comment

Choose a reason for hiding this comment

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

Some higher-level comments about roles and Clean arch. Let me know if you want to sync offline.

endpoint_type=endpoint_config.endpoint_type,
bundle_id=endpoint_config.bundle_id,
labels=endpoint_config.labels,
streaming_storage_gateway=FirehoseStreamingStorageGateway(),
Copy link
Contributor

Choose a reason for hiding this comment

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

should we actually call get_external_interfaces() before and use the monitoring_metrics_gateway and streaming_storage_gateway from there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah that could work

Copy link
Contributor Author

@tiffzhao5 tiffzhao5 Feb 14, 2024

Choose a reason for hiding this comment

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

seems like using external interfaces doesn't work, I can't import from api in inference

Copy link
Contributor

Choose a reason for hiding this comment

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

wait is this where the async forwarder is implemented? if not, I think this code might be dead code (i.e. it was used back when async task receive/push-result would run in the same container as the user code

Copy link
Contributor

Choose a reason for hiding this comment

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

if the code is dead code, then I think the import would work because there was at some point some amount of copying only part of the code to the user inference container because of security reasons

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah this is dead code so the import works but I'm referring to everywhere else (like in forwarding.py) it wouldn't work. also, if this is dead code anyways, then there's not really a point in importing from external interfaces?

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO we could probably just delete the dead code (as long as we're sure it's dead)

re forwarding.py I think it should be possible to make ExternalInterfaces importable; I guess since we have stuff in inference/{domain|infra}/gateways the current layout of things is a bit different; I still think that in the ideal state we'd be able to use the same plugins mechanism to control which interfaces we're using

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm how do we make it possible to be importable in forwarding.py? yeah ideally it does make sense to control which interfaces we're using.

Copy link
Contributor Author

@tiffzhao5 tiffzhao5 Feb 14, 2024

Choose a reason for hiding this comment

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

For the sake of rolling this feature out soon, I think for now I'll leave the 2 gateways like this and can always follow-up with deleting dead code / using ExternalInterfaces

@tiffzhao5 tiffzhao5 merged commit c427d0b into main Feb 15, 2024
@tiffzhao5 tiffzhao5 deleted the tiffany/write-to-firehose branch February 15, 2024 06:21
@yunfeng-scale yunfeng-scale mentioned this pull request Mar 6, 2024
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.

5 participants