Severity: P1 — the generated artifact is wrong or unusable. Verified live 2026-08-09. Note: the string-escaping bug (BUG-02) is already fixed (commit c6b2fd7); these are the remaining export_code defects.
BUG-03 — fit example is forecaster-shaped for every scitype
export_code(handle, include_fit_example=true) always emits {var}.fit(y) + {var}.predict(fh=fh), regardless of object_type:
export_code(<BoxCoxTransformer>, include_fit_example=true) -> runs, then AttributeError: no attribute 'predict'
export_code(<SlidingWindowSplitter>, include_fit_example=true) -> runs, then AttributeError: no attribute 'fit'
Fix: branch the example on the object_type tag — transformers get fit_transform(X), splitters get list(splitter.split(y)), classifiers/regressors get fit(X, y) + predict(X).
BUG-04 — is_pipeline heuristic false-positives on any list argument
is_pipeline = "*" in spec or "Pipeline" in spec or "[" in spec
SlidingWindowSplitter(window_length=24, fh=[1,2,3]) reports is_pipeline: true because of the [.
Fix: inspect the instantiated object (isinstance / object_type tag), not the spec string.
NB-15 — dataset parameter is ignored; fit example always hardcodes load_airline
export_code(<fitted NaiveForecaster>, dataset="sunspots", include_fit_example=true)
-> emitted code contains `from sktime.datasets import load_airline`
Data-handle ids are also silently accepted as dataset and still produce airline. An estimator fitted via y_handle gets a fabricated airline example with no provenance note.
Fix: honor the documented param; reject unknown dataset names / handle ids, or state the example dataset in the output.
NB-17 — loaded models can't be exported
load_model(path=<saved model>) -> handle with params: {}
export_code(<that handle>) -> {"success": false, "error": "No craft spec found in handle parameters."}
load_model handles carry empty params, so codegen has no spec to work from.
Fix: reconstruct a spec from get_params() (or repr) at load time so loaded models are exportable.
(Catalogued as BUG-03 / BUG-04 / NB-15 / NB-17 in MCP_TEST_FINDINGS.md.)
Severity: P1 — the generated artifact is wrong or unusable. Verified live 2026-08-09. Note: the string-escaping bug (BUG-02) is already fixed (commit c6b2fd7); these are the remaining
export_codedefects.BUG-03 — fit example is forecaster-shaped for every scitype
export_code(handle, include_fit_example=true)always emits{var}.fit(y)+{var}.predict(fh=fh), regardless ofobject_type:Fix: branch the example on the
object_typetag — transformers getfit_transform(X), splitters getlist(splitter.split(y)), classifiers/regressors getfit(X, y)+predict(X).BUG-04 —
is_pipelineheuristic false-positives on any list argumentSlidingWindowSplitter(window_length=24, fh=[1,2,3])reportsis_pipeline: truebecause of the[.Fix: inspect the instantiated object (
isinstance/object_typetag), not the spec string.NB-15 —
datasetparameter is ignored; fit example always hardcodesload_airlineData-handle ids are also silently accepted as
datasetand still produce airline. An estimator fitted viay_handlegets a fabricated airline example with no provenance note.Fix: honor the documented param; reject unknown dataset names / handle ids, or state the example dataset in the output.
NB-17 — loaded models can't be exported
load_modelhandles carry emptyparams, so codegen has no spec to work from.Fix: reconstruct a spec from
get_params()(orrepr) at load time so loaded models are exportable.(Catalogued as BUG-03 / BUG-04 / NB-15 / NB-17 in
MCP_TEST_FINDINGS.md.)