Skip to content

Provide the ability to instantiate the model using the config file generated with LightningCLI #15427

@mouroutzoglou

Description

@mouroutzoglou

🚀 Feature

Provide to the user some new interface, or modify the existing LightningCLI so that a model can be instantiated for testing/deployment/demos/notebooks/etc using a config.yaml (e.g., the same one generated during training).

Perhaps LightningCLI can have an extra command (besides fit, etc) that only returns the instantiated model, and perhaps the dataloaders.

Motivation

Currently, pytorch lightning lacks this feature (or it's well hidden!). What's the purpose of having modular training setups if you can't instantiate the trained model (for applications mentioned above) using the configs files you trained with. LightningCLI is rather limiting in that sense.

cc @Borda @carmocca @mauvilsa

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionIn a discussion stagefeatureIs an improvement or enhancementlightningclipl.cli.LightningCLI

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions