Repository navigation
v2.4.0
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 ofchapkit mlproject migrate. It reads the service info, config class, shell runner and artifact hierarchy from a service module and writes the MLproject thatchapkit mlproject runserves as the same service.--checkwrites 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--forceis passed.meta_data.config_format: chap_core|flatin an MLproject sets the layout of theconfig.ymlthe scripts read, so it applies however the service is started, including bychap eval --run-config.as-chapkitand the-cliimages. It lives undermeta_databecause chap-core rejects unknown top-level MLproject keys but ignores unknownmeta_datakeys.chapkit mlproject migratehonours it too.chapkit mlproject runoptions:--config-format chap_core|flatoverridesmeta_data.config_format.--database PATHkeeps 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 SECONDSsets the keepalive interval once registered with chap-core.--log-levelsets 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 runnames the artifact hierarchy after the MLprojectnameinstead of alwaysmlproject, matching the serviceschapkit mlproject migrateandchapkit initgenerate.ServiceBuilder.build()records the registration options onapp.state.registration_options.- Dependencies updated (#139, #140, #142), including polars 2.0.0 (already allowed by the
polarsextra, 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