Skip to main content

KMDS Modeling

kmds-modeling is a lightweight supporting package for KMDS modeling workflows. It provides the runtime plumbing, evaluation orchestration, artifact export utilities, and modeling contract documentation needed to bridge KMDS feature outputs and production-ready model assets.

Overview

  • Supports KMDS workspace modeling without embedding domain-specific business logic.
  • Provides a generic ExperimentRunner engine for cross-validation, transformer orchestration, and candidate model evaluation.
  • Includes a CLI for standard evaluation and production export flows.
  • Keeps workspace-specific examples and artifacts outside the installable package.

Key Features

  • Config-driven modeling pipeline via YAML configuration files (e.g. model_config.yaml)
  • Safe cross-validation with fold-specific transformer fitting
  • Uniform candidate wrapper support for any model implementation
  • Export of serialized model weights, feature pipeline, and metadata
  • Path coordination for KMDS workspace layout handling
  • Task contract documentation under documents/modeling_contracts/

Installation

pip install kmds-modeling

Package discovery

Clients can discover runtime metadata using the package API or import installed package metadata.

from kmds_modeling import get_package_info

info = get_package_info()
print(info)

The discovery payload includes standard fields used across KMDS packages:

  • package_name
  • version
  • entry_points
  • cli_commands
  • provided_packages
  • documentation_note

When installed, the package can also be resolved via importlib.metadata:

from importlib.metadata import version

print(version("kmds-modeling"))

CLI

The package exposes a command-line interface for model evaluation and export.

kmds-modeling evaluate --config /path/to/modeling_config.yaml
kmds-modeling export --config /path/to/modeling_config.yaml

Configuration

The package expects a YAML configuration file that defines:

  • project settings such as name, version, task type, and target variable
  • data settings including working directory, index column, and featurization paths
  • experiment_settings for cross-validation and metrics
  • candidates listing candidate models and their hyperparameters
  • production_target for champion export paths

The PathCoordinator resolves workspace-relative paths, including documents/modeling_contracts/, and ensures the package operates on KMDS-generated modeling artifacts.

Recommended Workflow

  1. Generate feature-engineered data with KMDS upstream tools such as kmds-featurization.
  2. Author a modeling_config.yaml with the correct workspace layout and candidate definitions.
  3. Run kmds-modeling evaluate to compare candidate models and generate a leaderboard.
  4. Select the champion candidate and run kmds-modeling export to produce model artifacts.

Project Structure

  • src/kmds_modeling/ — installable package source
  • src/kmds_modeling/cli.py — CLI entrypoint
  • src/kmds_modeling/core/runner.py — evaluation and export orchestration
  • src/kmds_modeling/core/path_coordinator.py — workspace path resolution
  • src/kmds_modeling/core/notebook_utils.py — notebook-friendly utilities
  • documents/modeling_contracts/ — task contract documentation for KMDS modeling

Contribution Notes

  • Keep core modeling logic generic and focused on KMDS pipeline support.
  • Add workspace-specific examples or experimental workflows outside the installable source tree.
  • Avoid coupling the package to any single KMDS project domain.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kmds_modeling-0.3.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kmds_modeling-0.3-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file kmds_modeling-0.3.tar.gz.

File metadata

  • Download URL: kmds_modeling-0.3.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kmds_modeling-0.3.tar.gz
Algorithm Hash digest
SHA256 314ba103592a608605a5fc7e7e216205d8b0e32ca7fafe5f6f9a3001841dcc48
MD5 4474fffd8ff32822e520c2b7a1526370
BLAKE2b-256 f3b748ec4aab7bcf9558ebd58ac614089d0be20baa94c3e2d8e87824094a3e31

See more details on using hashes here.

File details

Details for the file kmds_modeling-0.3-py3-none-any.whl.

File metadata

  • Download URL: kmds_modeling-0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kmds_modeling-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5548a5f41174a462f66abbe5a7edbbd7c3afb0c158c33e3acc2ff56185c0dd5c
MD5 9d36a5f62c400ef64b31751a7d5e0a18
BLAKE2b-256 cf10199e5123b1151b84722161c0c489797526c99cc94c2d5a53bc744bcfe484

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page