Skip to content

Store more information regarding modules in checkpoint #130

@ways

Description

@ways

Missing module info

When using older Checkpoints one needs to use same version of packages, especially anemoi-models. The checkpoint has versions of modules in Metadata.provenance, but only a simple version string.

In bris we list out modules with wrong version:

To install correct versions, run:
    pip install pillow==11.0.0 aniso8601==9.0.1 attrs==24.2.0 certifi==2024.08.30 charset_normalizer==3.4.0 ...
The following modules were not installed from a package. Visit the repo for each module and search for the hash. Install directly from hash using for example `pip install git+https://github.com/metno/example-module.git@80c9fbf`
    anemoi.datasets hash: 13397aa
    anemoi.training hash: 289ea71

There's no info where the last two modules came from, as they where pip-installed directly from a URL.

I'd like to store this info too, as it can be found in a file called direct_url.json

$ cat venv/lib/python3.12/site-packages/anemoi_models-0.1.dev92+g80c9fbf.dist-info/direct_url.json|jq
{
  "url": "https://github.com/metno/anemoi-models.git",
  "vcs_info": {
    "commit_id": "80c9fbfbb9fc925eadf1d4684197e73b9d481f5b",
    "requested_revision": "80c9fbf",
    "vcs": "git"
  }
}

Describe the solution you'd like

I'll make a PR to store additional data if there are no objections.

Describe alternatives you've considered

Additional context

Organisation

met.no

Metadata

Metadata

Assignees

No one assigned

    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