Skip to content

Add manifest file managment and sync to backend#11

Merged
hholb merged 3 commits intomainfrom
hholb/manifest
Mar 12, 2026
Merged

Add manifest file managment and sync to backend#11
hholb merged 3 commits intomainfrom
hholb/manifest

Conversation

@hholb
Copy link
Copy Markdown
Member

@hholb hholb commented Mar 12, 2026

Resolves: #7

Overview

This PR adds a system for creating and managing a manifest.json file that lives in the ROOTSTOCK_ROOT where information about the environments is tracked, then automatically pushed to the backend.

The cli.py module was getting unwieldy, so I split out the actual command logic into separate modules, leaving cli.py with the just arg parse setup.

Details

A couple of additions were needed to make this a smoother user experience. There is now a config.toml that lives in ~/.config/roostock/config.toml that has this shape:

root = "/path/to/rootstock/root"
api_key = "..."
api_secret = "..."
api_url = "https://garden-ai-{dev,prod}--rootstock-admin-manifest.modal.run/"

[maintainer]
name = "Hayden Holbrook"
email = "hholbrook@uchicago.edu"

The api_key and api_secret vales are needed to push the manifest file to the API url and are Modal Proxy Auth Tokens.

The CLI uses the root value from the config file by default, setting the ROOSTOCK_ROOT env var takes precedent over the config value, and passing --root on the cli takes precedent over all.

Init

To make setting up the config file easier there is a new rootstock init command that collects the values interactively and writes the config file.

Screen.Recording.2026-03-12.at.3.16.58.PM.mov

Manifest

Here is a sample of what the manifest file looks like:

{
  "schema_version": "1",
  "cluster": "Test Cluster",
  "root": "/tmp/rootstock-test",
  "maintainer": {
    "name": "Hayden Holbrook",
    "email": "hholbrook9@uchicago.edu"
  },
  "rootstock_version": "0.5.0",
  "python_version": "unknown",
  "last_updated": "2026-03-12T21:34:48.854245+00:00",
  "environments": {
    "chgnet_env": {
      "status": "ready",
      "built_at": "2026-03-12T15:32:14.864663+00:00",
      "source_hash": "sha256:ee3d3997682c2b5fd44e2e602a917080ad8e29d8e107990636b77af24ecbb871",
      "source": "# /// script\n# requires-python = \">=3.10\"\n# dependencies = [\n#     \"chgnet>=0.3.0\",\n#     \"ase>=3.22\",\n#     \"torch>=2.0\",\n# ]\n# ///\n\"\"\"\nCHGNet environment for Rootstock.\n\nThis environment provides access to CHGNet, a pretrained universal neural\nnetwork potential for charge-informed atomistic modeling.\n\"\"\"\n\n\ndef setup(model: str | None = None, device: str = \"cuda\"):\n    \"\"\"\n    Load a CHGNet calculator.\n\n    Args:\n        model: Optional path to a fine-tuned model. If None, uses the\n               default pre-trained CHGNet model.\n        device: PyTorch device string (e.g., \"cuda\", \"cuda:0\", \"cpu\")\n\n    Returns:\n        ASE-compatible calculator\n    \"\"\"\n    from chgnet.model import CHGNetCalculator\n\n    if model:\n        return CHGNetCalculator(model_path=model, use_device=device)\n    return CHGNetCalculator(use_device=device)\n",
      "python_requires": ">=3.10",
      "dependencies": {
        "ase": "3.27.0",
        "chgnet": "0.4.2",
        "rootstock": "0.6.1",
        "torch": "2.10.0"
      },
      "checkpoints": []
    }
}

As environments are created or updated, the manifest file is updated automatically and then uploaded to the backend.

Screen.Recording.2026-03-12.at.3.34.43.PM.mov

You can view the current manifest file with rootstock manifest show:

Screen.Recording.2026-03-12.at.3.36.07.PM.mov

If the pushing the manifest fails for some reason, you can manually push it with rootstock manifest push:

Screen.Recording.2026-03-12.at.3.37.29.PM.mov

@hholb hholb marked this pull request as ready for review March 12, 2026 21:41
@hholb hholb merged commit 063daba into main Mar 12, 2026
@hholb hholb deleted the hholb/manifest branch March 12, 2026 21:50
@hholb hholb mentioned this pull request Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design: system for keeping track of deployed sites, available models, etc.

2 participants