MNT: updates to HF Hub, manage fairlearn deprecation#392
Conversation
New pandas versions give FutureWarning for applymap. We have to wait for fairlearn to update this.
Starting from HF Hub 0.18, it has to be an array.
API changed a little bit, had to be adjusted.
This SHOULD NOT BE MERGED. Final min version will be 0.17 once the CI is green.
|
@adrinjalali This should be ready to review. CI is partly red, but that just seems to be due to rate limit. I'll restart the tests later. Edit: Seems to be a daily quota, so I guess this will have to wait a bit longer. Edit: No longer red. Ready for review. If accepted, we just need to lower the hf hub requirement and then it's ready to be merged. |
| ) | ||
| client = InferenceClient(token=token) | ||
| res_bytes = client.post(json={"inputs": inputs}, model=repo_id) | ||
| res = json.loads(res_bytes.decode("utf-8")) |
There was a problem hiding this comment.
don't we have a test for this?
There was a problem hiding this comment.
Yes, I forgot that we require [CI inference] in the commit message to trigger it. This is done now but of course we run into the rate limit again...
There was a problem hiding this comment.
Should we remove the functionality then since the rate limit is so low?
There was a problem hiding this comment.
It's mostly an issue for our CI, right? Which is probably why we made the test opt-in in the first place. I'd say we leave it, in case some users actually use the feature. If we want to remove it later on, we can do it properly with a deprecation cycle.
There was a problem hiding this comment.
We can also add a random sleep between 1 and 100 hours to avoid hitting the limit ;-P
There was a problem hiding this comment.
Hmm, not happy with a functionality that even our CI hits the limits pretty much every time. But we can merge and figure that out in a separate PR.
| "scikit-learn": ("0.24", "install", None), | ||
| "scikit-learn-intelex": ("2021.7.1", "docs", None), | ||
| "huggingface_hub": ("0.10.1", "install", None), | ||
| "huggingface_hub": ("0.18.0.rc0", "install", None), |
There was a problem hiding this comment.
should this change before merge?
There was a problem hiding this comment.
Yes, the actual min version is 0.17. I can change it now or we can first ensure that all tests pass for 0.18 too -- which may take some time ;-)
There was a problem hiding this comment.
Ok, let me know when they pass and then we can merge.
There was a problem hiding this comment.
Okay, I'll let you know in a month or two.
There was a problem hiding this comment.
Is it really that bad? So it's not something we can maintain. Let's fix the version merge here, then we deal with the deprecation
There was a problem hiding this comment.
Yeah, the error now says that the daily quota has been exceeded. I don't remember it being this tight, not sure if it was reduced. We may be able to avoid it by using a HF employee token, but then we have the old issue of hiding it while still allowing it to be used in PRs, right?
We could perhaps also restrict the inference test to only run in 1 or 2 settings, instead of the full matrix, to avoid the rate limit.
There was a problem hiding this comment.
At the end of the day, it's not a free service, and it doesn't match the vibe of this library anymore I would say. We added it because everybody could simply use it, but with the new rate limits, I don't see why we would keep supporting it.
There was a problem hiding this comment.
I agree, the rate limit is pretty aggressive (still couldn't make all tests pass), so for practical purposes, it's not a free service anymore. I think we have a few options, I'll leave the decision up to you:
- Still merge this PR, as I'm pretty sure it works (after adjusting the min version of course). Then create a new PR to deprecate the feature.
- Don't merge this PR. Deprecate the feature.
- Remove without deprecation.
There was a problem hiding this comment.
I'd be happy to merge this PR, then I'll open another PR to deprecate the feature.
It was 0.18.0.rc0 for testing only.
|
Its not related to this commit during pytest i am recieving variable declare errors , modules not installed errors like |
Some maintenance work to make skops future proof:
FutureWarningstemming from fairlearn: New pandas versions giveFutureWarningfor applymap. We have to wait for fairlearn to update this.Note: DON'T MERGE THIS YET. The min version of HF Hub has been increased to 0.18 to test the changes but it actually should be lowered to 0.17 once CI is green for 0.18.