Skip to content

Implement a C API for metatomic#232

Draft
Luthaf wants to merge 14 commits into
mainfrom
metatomic-core
Draft

Implement a C API for metatomic#232
Luthaf wants to merge 14 commits into
mainfrom
metatomic-core

Conversation

@Luthaf
Copy link
Copy Markdown
Member

@Luthaf Luthaf commented May 21, 2026

This is a long-lived branch and pull request for the next version of metatomic, intended to bring a C API, and through this the ability to define and run models in other ways that are not just PyTorch + TorchScript.

Broad set of next steps, to be implemented as PRs to this branch:

  • Scaffold a new metatomic-core package
    • Re-enable Windows Rust tests
  • Implement metatomic-core in Rust, exposing a C API
  • Implement a C++ API for metatomic-core
  • Implement a Python API for metatomic-core
  • Implement metatomic-torch on top of metatomic-core C++ API
  • Write a plugin to run Python models defined as scripts
  • Write a plugin to run existing (legacy) TorchScript models from C++

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

⚙️ Download Python wheels for this pull-request (you can install these with pip)

@Luthaf Luthaf force-pushed the metatomic-core branch 13 times, most recently from bb5dfaf to e3ff357 Compare May 26, 2026 14:41
Comment thread .github/workflows/python-tests.yml
Comment thread .github/workflows/python-tests.yml
Comment thread .github/workflows/python-tests.yml
Comment thread .github/workflows/rust-tests.yml
uses: actions/setup-python@v6
if: matrix.container == null
with:
python-version: "3.14.4"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to be this specific? If yes, why? Elsewhere, only 3.14 is used.

Copy link
Copy Markdown
Member Author

@Luthaf Luthaf May 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.14.5 had a bug with venv/ensurepip, hence the pin, but I'll add a comment!

EDIT: some failing logs: https://github.com/metatensor/metatomic/actions/runs/26566813574/job/78263488176

Comment thread docs/src/devdoc/index.rst

Metatensor is developed in the `COSMO laboratory`_ at `EPFL`_, and made
available under the `BSD 3-clauses license <LICENSE_>`_. We welcome
contributions from anyone, feel free to contact us if you need some help working
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add point of contact?

Comment thread metatomic-core/include/metatomic/model.hpp
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.

6 participants