Skip to content

Add chaining utility for torch export/package #111

@fmigneault

Description

@fmigneault

🚀 Feature Request

Chaining of the export and package steps provided in PR #97 might be very commonly performed. This chain of operations should be directly within the stac_model.torch utilities to allow users directly working with stac_model or MLM definitions to package their models as .pt2 archives more efficiently without dealing with intermediate files.

Potentially, there could be a stac_model.torch.save function that takes various combinations of nn.Module | ExportedProgram and deals with the branching/sub-tooling calls automatically to save the result.

Also considering crim-ca/mlm-extension#41 (comment), there could be a format option to that stac_model.torch.save function that can deal with STAC Item JSON vs MLM-metadata YAML representation.

🔉 Motivation

Avoid users having to understand all the intricacies of packaging a model if they can provide minimally viable definitions via MLM metadata and the nn.Module reference.

📡 Alternatives

Refer to the unit test example doing the same chain of operations in PR #97.

📎 Additional context

Originally posted by @fmigneault in #97 (comment)

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