API Reference / cli /

get_skeleton.py

tuiml get-skeleton: print a starter template for a new algorithm.

Thin CLI wrapper over the tuiml_get_skeleton tool. It emits a filled-in @classifier / @regressor class template that is ready to complete and hand to tuiml create-algorithm.

Functions

Command

tuiml get-skeleton

Line 18
tuiml get-skeleton [OPTIONS]

Print a ready-to-edit source template for a new algorithm.

The template is a complete @classifier or @regressor class with the class name, version, and docstring already filled in, plus placeholder hyperparameters. Fill in fit() and predict(), adjust __init__ and get_parameter_schema(), then submit the finished source with tuiml create-algorithm.

The template comes back in the code field of the result, so pipe the output through a JSON reader when you want the bare source on disk.

Requires TUIML_ALLOW_USER_ALGORITHMS=1 in the environment.

Print a classifier template with a chosen class name:

bash
$ tuiml get-skeleton --kind classifier --class-name MyGradientBoosting

Start a regressor at an explicit version, with a one-line description:

bash
$ tuiml get-skeleton --kind regressor --class-name MyRidge \
    --version 1.0.0 --description "Ridge regression with a custom solver"

Write just the source to a file, ready to edit and submit:

bash
$ tuiml get-skeleton --kind classifier --class-name MyKNN --json-output \
    | jq -r .code > my_knn.py

Options

--kind
str required
Task kind the new algorithm targets: 'classifier' or 'regressor'.
--class-name
str
Python identifier for the new class, e.g. 'MyGradientBoosting'. Defaults to 'MyAlgorithm'.
--version
str
Initial semver baked into the decorator, e.g. '1.0.0'.
--description
str
One-line description used as the module and class docstring.
--json-output
flag
Print the raw JSON result.