技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
custom-components【数据与研究】Extend auto-sklearn with custom classifiers, regressors, feature preprocessors, data preprocessors, ConfigSpace search spaces, registration, and component IDs.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task needs to author, repair, register, or restrict
auto-sklearn components rather than merely run an existing estimator. The package
imports as autosklearn; the inspected package version was 0.16.0dev /
0.16.0.dev0.
AutoSklearnClassificationAlgorithmAutoSklearnRegressionAlgorithmAutoSklearnPreprocessingAlgorithmget_properties(), get_hyperparameter_search_space(),
fit(), predict(), predict_proba(), and transform() for custom
components.add_classifier(), add_regressor(), or the feature/data
add_preprocessor() registry functions.include / exclude after
registration.AutoSklearnClassifier, AutoSklearnRegressor, or AutoSklearn2Classifier
usage: use ../estimators/SKILL.md.include / exclude, Dask, SMAC, budget, or ensemble
configuration with no custom component code: use
../search-and-parallelism/SKILL.md.feat_type, target validation, custom metrics, resampling, or
dataset compression: use
../data-metrics-validation/SKILL.md.AutoSklearnClassificationAlgorithm, registry
autosklearn.pipeline.components.classification.add_classifier, include key
"classifier".AutoSklearnRegressionAlgorithm, registry
autosklearn.pipeline.components.regression.add_regressor, include key
"regressor".AutoSklearnPreprocessingAlgorithm,
registry autosklearn.pipeline.components.feature_preprocessing.add_preprocessor,
include key "feature_preprocessor".AutoSklearnPreprocessingAlgorithm, registry
autosklearn.pipeline.components.data_preprocessing.add_preprocessor,
include key "data_preprocessor".references/component-contracts.md
before editing code. It contains the required properties, constants, built-in
IDs, registry rules, and ConfigSpace rules.python scripts/component_skeleton.py --kind classifier --class-name MyClassifier
or write it with --output my_components.py.include /
exclude is the class name, for example {"classifier": ["MyClassifier"]}.get_properties(),
call get_hyperparameter_search_space(), register the class, and confirm the
choice appears in the relevant component catalog or estimator configuration
space.references/workflows.md.
For errors, use references/troubleshooting.md.Classifier registry check after importing the module that defines the class:
from autosklearn.pipeline.components.classification import ClassifierChoice, add_classifier
from my_components import MyClassifier
add_classifier(MyClassifier) # harmless if your module did not self-register
props = MyClassifier.get_properties()
required = {
"shortname", "name", "handles_regression", "handles_classification",
"handles_multiclass", "handles_multilabel", "handles_multioutput",
"is_deterministic", "input", "output",
}
assert set(props) == required
cs = MyClassifier.get_hyperparameter_search_space()
assert "MyClassifier" in ClassifierChoice.get_components()
Estimator restriction check without starting a long run:
import autosklearn.classification
automl = autosklearn.classification.AutoSklearnClassifier(
time_left_for_this_task=30,
per_run_time_limit=10,
include={"classifier": ["MyClassifier"]},
initial_configurations_via_metalearning=0,
smac_scenario_args={"runcount_limit": 1},
)
# Build or inspect the configuration space with tiny in-memory X/y before any
# expensive fit. If the ID is wrong, this should fail before training.
Relevant native candidates are the component registration unit checks, component
base-contract checks, and the extension examples. The extension examples are
fit-heavy and should remain skip-expensive unless a verifier deliberately bounds
them; prefer the bundled skeleton --help check and static registry/config-space
checks first.