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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file stac_model-0.1.0.tar.gz.

File metadata

  • Download URL: stac_model-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-37-generic

File hashes

Hashes for stac_model-0.1.0.tar.gz
Algorithm Hash digest
SHA256 18120aa3f8364b7ec477b06d210362c1656dc1921fca0e10ce7c487d0898b7d8
MD5 c2278660e987ae9f990b2c00509bcd0c
BLAKE2b-256 39317acb13d36fc2e771eb777951c4a7557ebe3f2ecc1c4768f95e26b8b72715

See more details on using hashes here.

Provenance

File details

Details for the file stac_model-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stac_model-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-37-generic

File hashes

Hashes for stac_model-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6b625ac3df0d9d55c1773e0df73ec3b1739df4fd5743cc5de4c315201ee1413
MD5 319b6de639d8c16b91a415d65e196970
BLAKE2b-256 30a93f5758f49cb423b4993fbb0a566da24a6b97c129b46d504cb8ca49f260a5

See more details on using hashes here.

Provenance

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