Skip to content

implement static method PieBaseHFHubMixin.retrieve_config -> Optional[Dict[str, Any]] #452

Open
@ArneBinder

Description

@ArneBinder

... which does just the part about config loading (either from the HF hub or from local file) currently implemented as part of PieBaseHFHubMixin.from_pretrained. The method should return None if it could not load a config from the model_id.

Background: This will allow to check if a config can be loaded from model_id at all which is again useful for conditional loading in AutoPipeline. In the future, the taskmodule config may be embedded in the model config and instantiated there. This is now possible because of #450 (having no option to override just specific, nested keys, which the taskmodule config entries would be if it is embedded in the model config, was a blocker so far). However, for background compatibility the taskmodule should be instantiated from the taskmodule_config.json if available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions