-
Notifications
You must be signed in to change notification settings - Fork 8
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
together.Model.ready(model_name) #29
Conversation
we decided to create a new API instead of do this via CLI |
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.
This is great!
Left comments. Also could you please add this to the CLI as well? Something like "together models ready [NAME]" would work.
|
||
if response.status_code == 200: | ||
response_json = response.json() | ||
for model_dict in response_json: |
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.
Are there multiple model_dicts in response_json? If so, then return isn't going to return all of them.
if model_dict.get("name") == model: | ||
depth_num_asks = model_dict["depth"]["num_asks"] | ||
if depth_num_asks > 0: | ||
return {"ready":f"model is ready for start, status code:{depth_num_asks}"} |
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.
Let's replace "model" with the model name?
if model_dict.get("name") == model: | ||
depth_num_asks = model_dict["depth"]["num_asks"] | ||
if depth_num_asks > 0: | ||
return {"ready":f"model is ready for start, status code:{depth_num_asks}"} |
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.
I think we should have two keys in this dict. "ready" which is a bool and "message" which contains this text. That way it's easier for the end user to put this in a loop without having to parse the string.
Sorry for the false PR, the issue was updated that we should do this from the API end and not from the python library CLI end. |
This PR fixes https://github.com/togethercomputer/planning/issues/2254. It allows users to check if their newly finetuned model is finished deploying and ready for completeions using our inference API:
the status code is our
depth_num_asks