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

Support remote predict #512

Merged
merged 6 commits into from
Aug 9, 2023
Merged

Support remote predict #512

merged 6 commits into from
Aug 9, 2023

Conversation

bolasim
Copy link
Collaborator

@bolasim bolasim commented Aug 7, 2023

No description provided.

@bolasim bolasim force-pushed the bola/truss-remote-predict branch from 806a084 to ff33d5c Compare August 9, 2023 15:52
@bolasim
Copy link
Collaborator Author

bolasim commented Aug 9, 2023

#525

@bolasim bolasim marked this pull request as ready for review August 9, 2023 16:24
Copy link
Collaborator

@squidarth squidarth left a comment

Choose a reason for hiding this comment

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

couple questions -- feels like there might be some error handling work to do here, but ok to roll forward & do in follow-ups since this is new functionality

@@ -28,6 +28,11 @@ def exists_model(api: BasetenApi, model_name: str) -> Optional[str]:
return None


def get_model_versions_info(api: BasetenApi, model_name) -> Tuple[str, dict]:
query_result = api.get_model(model_name)["model_version"]["oracle"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

what happens if the model version doesn't exist anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah. I'll clean up the query

if published:
for mv in model_versions:
if not mv["is_draft"]:
model_version = mv
Copy link
Collaborator

Choose a reason for hiding this comment

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

what assumptions are we making about order here? what if there are multiple non-draft versions that get returned

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah. this needs to modify the query to sort by return time. I'll play around with the query a bit to get this right. I'd rather have a good graphql query that returns the right version instead of doing the post processing here.

@bolasim bolasim merged commit e8da1be into main Aug 9, 2023
@bolasim bolasim deleted the bola/truss-remote-predict branch August 9, 2023 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.

2 participants