Skip to content

Revise and expand artifact types to include more frameworks, remove torch.compile #31

@rbavery

Description

@rbavery

🚀 Feature Request

Currently we only suggest Pytorch artifact types.

And torch.compile is not an artifact type. From the pytorch docs

torch.compile() is a JIT compiler whereas which is not intended to be used to produce compiled artifacts outside of deployment.

https://pytorch.org/docs/stable/export.html#existing-frameworks

So I think we should remove torch.compile from the list since no one should be using this to specify a model artifact type.

Here's an initial list that includes more frameworks

Scikit-learn (Python)

  • Pickle (.pkl)
  • Joblib (.joblib)

TensorFlow (Python)

  • SavedModel
  • HDF5 (.h5)
  • Checkpoint

ONNX (Open Neural Network Exchange) (Language-agnostic)

.onnx

PyTorch (Python)

  • TorchScript Tracing (.pt)
  • Torchscript Scripting (.pt)
  • torch.export (.pt2)
  • torch.save Pickle (.pt)

Other Frameworks

XGBoost (framework specific binary format)
LightGBM (framework specific binary format)
PMML (Predictive Model Markup Language - XML)

R

.rds, .rda
???

Julia

JLD, JLD2
BSON
???

the above list was partially llm generated so take it with some salt, I can look into and confirm use if we decide to move forward wtih this and provide a more exhaustive set of options.

🔉 Motivation

We'd like users outside of the Pytorch ecosystem to understand how to describe their model artifacts so that it is easier to know what part of a framework should be used to load the model and the different runtime dependencies involved since different artifact types have different runtime dependencies.

Francis raised that the list is currently overly specific to Pytorch and I agree: crim-ca/dlm-extension#2 (comment)

📡 Alternatives

Keep this part of the spec focused on Pytorch and loose with no more recommendations.

📎 Additional context

I'm down to expand this suggestion. I think in terms of validation, we can be lax on the artifact value type that is passed here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions