-
Notifications
You must be signed in to change notification settings - Fork 80
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
Conversation
806a084
to
ff33d5c
Compare
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.
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"] |
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.
what happens if the model version doesn't exist anymore?
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.
yeah. I'll clean up the query
if published: | ||
for mv in model_versions: | ||
if not mv["is_draft"]: | ||
model_version = mv |
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.
what assumptions are we making about order here? what if there are multiple non-draft versions that get returned
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.
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.
No description provided.