from xorq.expr.ml.cross_validation import (
    deferred_cross_val_score,
    make_deterministic_sort_key,
)
from xorq.expr.ml.fit_lib import (
    deferred_fit_predict,
    deferred_fit_predict_sklearn,
    deferred_fit_transform,
    deferred_fit_transform_series_sklearn,
    deferred_fit_transform_sklearn,
    deferred_fit_transform_sklearn_struct,
)
from xorq.expr.ml.metrics import (
    deferred_sklearn_metric,
)
from xorq.expr.ml.quickgrove_lib import (
    collect_predicates,  # noqa: F401
    make_quickgrove_udf,
    rewrite_quickgrove_expr,
)
from xorq.expr.ml.split_lib import (
    _calculate_bounds,  # noqa: F401
    calc_split_column,  # noqa: F401
    train_test_splits,
)


also = []
try:
    from xorq.expr.ml.pipeline_lib import (
        FittedPipeline,  # noqa: F401
        Pipeline,  # noqa: F401
        Step,  # noqa: F401
    )

    also = [
        "FittedPipeline",
        "Pipeline",
        "Step",
    ]
except ImportError:
    pass


__all__ = [
    "deferred_cross_val_score",
    "make_deterministic_sort_key",
    "train_test_splits",
    "make_quickgrove_udf",
    "rewrite_quickgrove_expr",
    "deferred_fit_predict",
    "deferred_fit_predict_sklearn",
    "deferred_fit_transform",
    "deferred_fit_transform_sklearn",
    "deferred_fit_transform_sklearn_struct",
    "deferred_fit_transform_series_sklearn",
    "deferred_sklearn_metric",
] + also
