Skip to content

Conversation

@mishig25
Copy link
Collaborator

@mishig25 mishig25 commented May 3, 2024

I think wait_for_model usage is flipped incorrectly in #148. Check files tab

What prompted this error:
from @gary149

503 but no error appears in the UI?
https://huggingface.co/microsoft/Phi-3-mini-128k-instruct?text=hi

Explanation: although widget sends wait_for_model: false, inference.js does NOT throw error and tries to load the model and make a call to this model once it is loaded

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Looks good at first glance

@mishig25
Copy link
Collaborator Author

mishig25 commented May 3, 2024

will wait for others to confirm

const response = await (options?.fetch ?? fetch)(url, info);

if (options?.retry_on_error !== false && response.status === 503 && !options?.wait_for_model) {
if (options?.retry_on_error !== false && response.status === 503 && options?.wait_for_model) {

This comment was marked as off-topic.

@coyotte508
Copy link
Member

coyotte508 commented May 3, 2024

you should pass retry_on_error: false instead of wait_for_model: false in widgets, I think that would solve it

(but yes we could probably remove retry_on_error as some point and check wait_for_model for false, true or undefined)

@mishig25
Copy link
Collaborator Author

mishig25 commented May 3, 2024

@coyotte508 submitted #650, should I close this PR #649 then?

@coyotte508
Copy link
Member

yes you can close :)

@mishig25 mishig25 closed this May 3, 2024
@mishig25 mishig25 deleted the inference_flag_wait_for_model branch May 3, 2024 11:05
@mishig25
Copy link
Collaborator Author

mishig25 commented May 3, 2024

superceded by #650

mishig25 pushed a commit that referenced this pull request May 3, 2024
from
#649 (comment)

> you should pass retry_on_error: false instead of wait_for_model: false
in widgets, I think that would solve it

> (but yes we could probably remove retry_on_error as some point and
check wait_for_model for false, true or undefined)


### on main

from @gary149 

> 503 but no error appears in the UI?
https://huggingface.co/microsoft/Phi-3-mini-128k-instruct?text=hi

<img
src="https://github.com/huggingface/huggingface.js/assets/11827707/c07ce78d-3e00-45e1-b07d-dfa709c2ebe5"
width="200px">

### this PR/branch


https://github.com/huggingface/huggingface.js/assets/11827707/05cfd37b-fd15-482e-82ae-cdb76961707b
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.

4 participants