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

Correctly check inference endpoint is ready #2229

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Apr 16, 2024

From @McPatate on slack (internal):

The condition in the InferenceEndpoints::wait function isn't what I expect to mean "ready":

        while True:
            self.fetch()
            if self.url is not None:  # Means the endpoint is deployed
                logger.info("Inference Endpoint is ready to be used.")
                return self

as the url can be provisioned before the endpoint started. Wasn't it that we made it so that huggingface_hub queries the url until status is 200?

This PR fixes this by making a GET request on the returned URL before returning (in .wait call).

@Wauplin Wauplin requested a review from McPatate April 16, 2024 10:03
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@McPatate McPatate left a comment

Choose a reason for hiding this comment

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

lgtm!

@Wauplin
Copy link
Contributor Author

Wauplin commented Apr 16, 2024

Thanks for the review :)

@Wauplin Wauplin merged commit 479ab66 into main Apr 16, 2024
16 checks passed
@Wauplin Wauplin deleted the correctly-check-inference-endpoint-ready branch April 16, 2024 11:51
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.

None yet

3 participants