Skip to content

Make strict loading configurable in Fabric.load() #16447

@awaelchli

Description

@awaelchli

Description & Motivation

We added a new API for loading in Fabric in #16434. The loading of the module parameters currently uses just strict=True.

Pitch

Make it an argument. See todo notes in code here:
https://github.com/Lightning-AI/lightning/blob/39acb81b9bd01139f7cead31c673f25ba330f2f1/src/lightning_fabric/strategies/strategy.py#L270-L273

and here:

https://github.com/Lightning-AI/lightning/blob/39acb81b9bd01139f7cead31c673f25ba330f2f1/src/lightning_fabric/strategies/strategy.py#L281-L282

This may not be valid for all strategies. Thus, the argument type should probably be Optional[bool] = None.

Alternatives

No response

Additional context

No response

cc @Borda @carmocca @justusschock @awaelchli

Metadata

Metadata

Assignees

No one assigned

    Labels

    fabriclightning.fabric.FabricfeatureIs an improvement or enhancementhelp wantedOpen to be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions