Skip to main content

A PydanticV2 validation and serialization libary for the STAC ML Model Extension

Project description

stac-model

Python support PyPI Release Repository Releases Docs

Contributions Welcome

Poetry Pre-commit Semantic versions Pipelines

A PydanticV2 validation and serialization library for the STAC ML Model Extension

Installation

pip install -U stac-model

or install with Poetry:

poetry add stac-model

Then you can run

stac-model --help

or with Poetry:

poetry run stac-model --help

Creating an example metadata json

poetry run stac-model

This will make an example example.json metadata file for an example model.

Currently this looks like

{
  "signatures": {
    "inputs": [
      {
        "name": "input_tensor",
        "dtype": "float32",
        "shape": [
          -1,
          13,
          64,
          64
        ]
      }
    ],
    "outputs": [
      {
        "name": "output_tensor",
        "dtype": "float32",
        "shape": [
          -1,
          10
        ]
      }
    ],
    "params": null
  },
  "artifact": {
    "path": "s3://example/s3/uri/model.pt",
    "additional_files": null
  },
  "id": "3fa03dceb4004b6e8a9e8591e4b3a99d",
  "class_map": {
    "class_to_label_id": {
      "Annual Crop": 0,
      "Forest": 1,
      "Herbaceous Vegetation": 2,
      "Highway": 3,
      "Industrial Buildings": 4,
      "Pasture": 5,
      "Permanent Crop": 6,
      "Residential Buildings": 7,
      "River": 8,
      "SeaLake": 9
    }
  },
  "runtime_config": null,
  "name": "eurosat",
  "ml_model_type": null,
  "ml_model_processor_type": "cpu",
  "ml_model_learning_approach": null,
  "ml_model_prediction_type": null,
  "ml_model_architecture": null
}

:chart_with_upwards_trend: Releases

You can see the list of available releases on the GitHub Releases page.

License

This project is licenced under the terms of the Apache Software License 2.0 licence. See LICENCE for more details.

Credits Python project templated from galactipy.

This project was generated with galactipy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stac_model-0.1.0.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

stac_model-0.1.0-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page