Skip to content

v2.3.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 11:36
· 21 commits to main since this release
v2.3.0
8d836b2

chapkit mlproject run now serves any existing MLproject as a full chapkit service that chap-core can use: the model contract from the MLproject, typed user options validated the way chap-core validates them, and MLproject adapters. Point it at a YAML file and go; nothing is written to the project.

Added

  • chapkit mlproject run serves the full MLServiceInfo contract from the MLproject (CLIM-1340, #133):
    • all of meta_data: display name, description, author, author note, assessed status, contact email, organization, logo, citation and documentation URL;
    • version, required_covariates, allow_free_additional_continuous_covariates and requires_geo;
    • supported_period_type, with chap-core's week / month spellings understood and a missing value meaning any;
    • the forecast horizon bounds under every spelling chap-core accepts (min_prediction_periods, min_prediction_length and camelCase).
  • target (default disease_cases) and hpo_search_space fields on MLServiceInfo.
  • user_options are read as JSON Schema, as chap-core reads them:
    • each MLproject gets a typed config class (enum, arrays with items, unions such as [array, integer], anyOf, nullable types, bounds), so OpenAPI and the console's config form show the real types;
    • every value is also validated with jsonschema, the validator chap-core uses, so configs are accepted and rejected exactly as chap-core would, including oneOf, allOf, not, const and pattern.
  • ShellModelRunner(adapters=...) applies MLproject adapters with chap-core's rules: copy a column under a new name, or derive year / month / week from time_period. mlproject run passes the MLproject's adapters, so models such as ewars find columns like Cases and E.
  • chapkit mlproject run accepts a path to the MLproject file as well as its directory, and stops with a clear message when the host or port cannot be bound.

Changed

  • chapkit mlproject migrate reads the contract through the same code as run. The generated main.py:
    • maps week / month correctly, and a missing period type becomes any instead of monthly;
    • carries the horizon bounds, target, hpo_search_space and adapters;
    • drops a malformed contact email with a warning, instead of producing a main.py that fails to import;
    • keeps the default prediction_periods inside the declared horizon bounds.
  • Migrated projects that use adapters, target or hpo_search_space require chapkit>=2.3.0.
  • A user option without a type accepts any value, as in JSON Schema and chap-core. It was previously coerced to a string.
  • Values that would not validate (a non-URL logo, a malformed email, an unknown assessed status or horizon bound, a default that does not fit its type) are printed as warnings at startup instead of stopping existing MLprojects from running.
  • New runtime dependency: jsonschema (which brings in referencing, rpds-py and attrs).
  • Dependency updates: Python and frontend dependency groups. (#131, #132)

Fixed

  • chap-core rejected services started with chapkit mlproject run, because they served a plain ServiceInfo without model_metadata and period_type. They now serve a valid MLServiceInfo.
  • Array user options were turned into strings in config.yml; for example, ewars n_lags reached scripts as "[3]". They are now real lists.

Upgrading

  • Model services: bump to chapkit>=2.3.0,<3. No code changes needed.
  • chap-core 2.2.0 and later ignore the new target and hpo_search_space info fields until its schema reads them.
  • Re-running chapkit mlproject migrate on an MLproject without supported_period_type now generates PeriodType.any. Set it explicitly if the model only handles monthly or weekly data.

Known issue

  • chapkit mlproject run does not yet register itself with chap-core when SERVICEKIT_ORCHESTRATOR_URL is set. Generated projects (chapkit init, chapkit mlproject migrate) are not affected. A fix is planned for 2.3.1.

What's Changed

  • chore: bump version to 2.3.0.dev0 by @mortenoh in #130
  • feat: serve the full MLproject contract, typed options and adapters from chapkit mlproject run (CLIM-1340) by @mortenoh in #133
  • chore(deps): bump the python-dependencies group across 1 directory with 3 updates by @dependabot[bot] in #131
  • chore(deps): bump the frontend-dependencies group in /frontend with 7 updates by @dependabot[bot] in #132
  • chore: release 2.3.0 (CLIM-1340) by @mortenoh in #134

Full Changelog: v2.2.0...v2.3.0