Skip to content

Add making requests to synchronous endpoints - #225

Merged
seanshi-scale merged 6 commits into
hmi-releasefrom
seanshi/deploy-synchronous-endpoints
Feb 25, 2022
Merged

Add making requests to synchronous endpoints#225
seanshi-scale merged 6 commits into
hmi-releasefrom
seanshi/deploy-synchronous-endpoints

Conversation

@seanshi-scale

@seanshi-scale seanshi-scale commented Feb 22, 2022

Copy link
Copy Markdown
Contributor

@seanshi-scale seanshi-scale self-assigned this Feb 24, 2022
@seanshi-scale
seanshi-scale marked this pull request as ready for review February 24, 2022 22:44
Comment thread nucleus/deploy/client.py
for endpoint in resp["endpoints"]
if endpoint["endpoint_type"] == "sync"
]
return async_endpoints + sync_endpoints

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't the set of async and sync endpoints comprise the full set of possible endpoints? If so, can we just return resp["endpoints"]?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is the full set of endpoints, but the object returned is a list of either SyncModelEndpoints or AsyncModelEndpoints, so we have to construct them separately (or do something like modelEndpointClass = SyncModelEndpoint if <x> else Async)

Comment thread nucleus/deploy/model_endpoint.py Outdated
def __str__(self):
return f"SyncModelEndpoint <endpoint_id:{self.endpoint_id}>"

def predict_one(self, url):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we just call this predict?

Also, non-url inputs are in a different ticket, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

re non-url inputs, they are in a different ticket, and I'm inclined to just open a different pr for them as well at this point

re predict, have offline discussion

@seanshi-scale
seanshi-scale merged commit 2e8becb into hmi-release Feb 25, 2022
@seanshi-scale
seanshi-scale deleted the seanshi/deploy-synchronous-endpoints branch February 25, 2022 22:21
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.

3 participants