Skip to content

Proposal: Extend the example JSON definition to Assets #6

@fmigneault

Description

@fmigneault

For the Machine Learning Model (MLM) extension, one of the Assets consist of the "source code" required to run the model training or inference pipeline. Provided that this definition is in itself a great example on how to run the model, it would make sense to mark it as such.

The current definition of the "source code" is as follows:

{
  "assets": {
    "source-training": {
      "href": "https:/github.com/org/repo/app.py",
      "type": "text/x-python",
      "title": "Source code to train the ML model.",
      "roles": [
        "ml-model:training-runtime",
        "mlm:model",
        "code",
        "metadata"
      ],
      "mlm:entrypoint": "app:train"
    }
  }
}

As we can see, there are strong resemblances to the example links, since details such as example:container and example:language would be relevant here as well. However, in the context of MLM, this script cannot be "only" considered an rel: example, since it is the definition that really tells us how to run it. An Asset seems more appropriate, since it is core to using the model itself.

While defining this "source code asset", similar consideration to the example:container field were also brought up (see https://github.com/crim-ca/dlm-extension/blob/validate/README.md#source-code-asset). If possible, I would like to leverage the example fields directly under the asset, instead of reinventing them with mlm: prefix. Another field that was relevant in our opinion is mlm:entrypoint, in case the referenced code has more than one function. This could be added to the exemple extension as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions