Skip to content

v2.4.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 09:43
· 12 commits to main since this release
v2.4.0
e75ad44

Minor release: chapkit mlproject run gets the settings a hand-written main.py service has (config layout, persistence, keepalive, log level), and the new chapkit mlproject export generates an MLproject from a main.py, so one model can be served both ways without the two drifting apart.

Added

  • chapkit mlproject export [main.py] [--check] (CLIM-1435, #141), the reverse of chapkit mlproject migrate. It reads the service info, config class, shell runner and artifact hierarchy from a service module and writes the MLproject that chapkit mlproject run serves as the same service. --check writes nothing and fails when the file is stale or when chapkit's own MLproject reader would serve a different /api/v1/info, config options, defaults or accepted values, commands, adapters or config layout, so it can guard the file in CI. Settings an MLproject cannot carry (validation hooks, custom level labels, API key auth, a custom keepalive interval, extra routes) are reported as warnings. Export runs the module, import-time side effects included, and refuses to overwrite an MLproject it did not generate unless --force is passed.
  • meta_data.config_format: chap_core|flat in an MLproject sets the layout of the config.yml the scripts read, so it applies however the service is started, including by chap eval --run-config.as-chapkit and the -cli images. It lives under meta_data because chap-core rejects unknown top-level MLproject keys but ignores unknown meta_data keys. chapkit mlproject migrate honours it too.
  • chapkit mlproject run options:
    • --config-format chap_core|flat overrides meta_data.config_format.
    • --database PATH keeps configs and trained models in a SQLite file so they survive a restart; predict works on a model trained before it. It takes a plain file path, created if missing. Job history stays in memory. A database file inside the project that the train/predict workspace copy would not skip gets a startup warning.
    • --keepalive-interval SECONDS sets the keepalive interval once registered with chap-core.
    • --log-level sets the log level from the first line, including the lines written while the service is built.
  • The startup output shows the config layout and where state is stored.

Changed

  • chapkit mlproject run names the artifact hierarchy after the MLproject name instead of always mlproject, matching the services chapkit mlproject migrate and chapkit init generate.
  • ServiceBuilder.build() records the registration options on app.state.registration_options.
  • Dependencies updated (#139, #140, #142), including polars 2.0.0 (already allowed by the polars extra, now tested against), SQLAlchemy 2.1.4, FastAPI 0.143.1, pydantic 2.14.1 and the console's frontend packages.

Upgrading

No code changes required. Defaults are unchanged: chapkit mlproject run keeps its state in memory and writes config.yml in chap-core's layout unless the MLproject or --config-format says otherwise. The only visible difference is the artifact hierarchy name of mlproject run services, which now follows the MLproject name; nothing filters on it, and in-memory state holds no artifacts under the old name.

chap eval --run-config.as-chapkit uses the chapkit installed alongside chap-core, so it picks up meta_data.config_format once chap-core depends on chapkit 2.4.0.

What's Changed

  • chore: bump version to 2.4.0.dev0 by @mortenoh in #138
  • feat: mlproject run options and chapkit mlproject export (CLIM-1435) by @mortenoh in #141
  • chore(deps): bump astral-sh/setup-uv from 10.2.0 to 10.3.0 in the github-actions group by @dependabot[bot] in #139
  • chore(deps): bump the frontend-dependencies group in /frontend with 12 updates by @dependabot[bot] in #140
  • chore: update Python dependencies by @mortenoh in #142
  • chore: release 2.4.0 (CLIM-1435) by @mortenoh in #143

Full Changelog: v2.3.1...v2.4.0