fix: pass download_config to LocalEvaluationModuleFactory calls#770
Open
aadhar-build wants to merge 1 commit into
Open
fix: pass download_config to LocalEvaluationModuleFactory calls#770aadhar-build wants to merge 1 commit into
aadhar-build wants to merge 1 commit into
Conversation
Fixes huggingface#709: Two call sites in evaluation_module_factory() that instantiate LocalEvaluationModuleFactory omit the download_config parameter, so any custom download configuration (e.g. token, proxies, retries) passed by the caller is silently dropped for local metric scripts. Pass download_config=download_config to both calls, matching the existing behaviour of HubEvaluationModuleFactory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #709.
Two call sites in
evaluation_module_factory()that instantiateLocalEvaluationModuleFactoryomit thedownload_configparameter:This means any custom
DownloadConfigpassed by the caller (e.g. custom token, proxies, retries, or cache settings) is silently dropped when loading local metric scripts. The same config is correctly forwarded when loading from the Hub viaHubEvaluationModuleFactory.Fix
Add
download_config=download_configto bothLocalEvaluationModuleFactoryinstantiations, matching the pattern already used forHubEvaluationModuleFactory:This ensures that callers who pass a
DownloadConfig(e.g. withuse_auth_token,proxies, or customuser_agent) have that config respected even when the metric is loaded from a local path.