Metadata-Version: 2.4
Name: ai-library-swch
Version: 0.1.1
Summary: AI helper utilities and models
Requires-Python: ==3.12.3
Description-Content-Type: text/markdown
Requires-Dist: annotated-types==0.7.0
Requires-Dist: anyio==4.13.0
Requires-Dist: cloudpathlib==0.24.0
Requires-Dist: cloudpickle==3.1.2
Requires-Dist: confection==1.3.3
Requires-Dist: durationpy==0.10
Requires-Dist: fastai==2.8.7
Requires-Dist: fastcore==1.13.2
Requires-Dist: fastprogress==1.1.6
Requires-Dist: httpcore==1.0.9
Requires-Dist: matplotlib==3.11.0
Requires-Dist: mpmath==1.3.0
Requires-Dist: numpy==2.4.6
Requires-Dist: pandas==3.0.3
Requires-Dist: preshed==3.0.13
Requires-Dist: pyarrow==24.0.0
Requires-Dist: pydantic_core==2.46.4
Requires-Dist: PyYAML==6.0.3
Requires-Dist: requests==2.34.2
Requires-Dist: requests-oauthlib==2.0.0
Requires-Dist: scikit-learn==1.7.2
Requires-Dist: setuptools==81.0.0
Requires-Dist: swchmonclient==0.2.0
Requires-Dist: threadpoolctl==3.6.0
Requires-Dist: torch==2.12.0
Requires-Dist: torchaudio==2.11.0
Requires-Dist: torchvision==0.27.0
Requires-Dist: tsai==1.0.1
Requires-Dist: typing-inspection==0.4.2
Requires-Dist: typing_extensions==4.15.0
Requires-Dist: xgboost==3.2.0

# ai_library

`ai_library` is a Python package that exposes model training, inference, metrics recording, cron scheduling, and package-based configuration management.

## Package overview

- model selection and all other parameters are done via the config file. 
  - train writes to the config file model (path), infer tries to load a model of that type.

- `ai_library.validate_config(config_path=None)`
  - Loads and validates the package default `ai_library/config.yaml` if no path is provided.
  - Returns the parsed configuration dictionary.

- `ai_library.update_config(config_path=None, updates=...)`
  - Updates the package config file by default.
  - Supports a dictionary, a `[key, value]` pair, or a list of `[key, value]` pairs.

- `ai_library.show_config(config_path=None)`
  - Prints the current configuration to stdout.

- `ai_library.train()`
  - Loads configuration from save_file path of the package config.
  - Reads data, builds the selected pipeline, and trains the model.

- `ai_library.infer()`
  - Loads package configuration from save_file path from config.
  - Loads a saved model and performs inference.

- `ai_library.record`
  - Use `ai_library.record.main()` or run the module directly to start metric collection. Run in background.

- `ai_library.add_to_cron()` / `ai_library.remove_from_cron()`
  - Manage cron scheduling for recurring training runs.
  - Adds or removes a cron job that runs `python3 -m ai_library.codebase.setup.train`.
