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

Fix Space runtime on static Space #1754

Merged
merged 2 commits into from
Oct 17, 2023
Merged

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Oct 17, 2023

huggingface_hub.get_space_runtime was previously raising an exception on Static Space because hardware is not returned by the server. This PR fixes it by setting hardware to None.

cc @clefourrier @hysts (from internal slack)

@Wauplin Wauplin requested a review from clefourrier October 17, 2023 13:19
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 17, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@clefourrier clefourrier left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +119 to +122
self.hardware = data.get("hardware", {}).get("current")
self.requested_hardware = data.get("hardware", {}).get("requested")
self.sleep_time = data.get("gcTimeout")
self.storage = data.get("storage")
Copy link
Member

Choose a reason for hiding this comment

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

syntax is not super pretty but LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll yet you open an issue on https://github.com/python/cpython and in the meantime merge this PR 😄

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@Wauplin Wauplin merged commit 5c19b56 into main Oct 17, 2023
16 checks passed
@Wauplin Wauplin deleted the fix-space-runtime-on-static-space branch October 17, 2023 13:37
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