hyb
2026-01-30 7657e1b2fa251a2ea372710ad75cb395a3c0e374
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Ë
Wñúh§ãój—dZddlmZmZddlZddlmZddlm    Z    ddl
m Z m Z ddl mZGd„d    e«Zy)
z’Base classes for MySQL HeatWave ML estimators for Connector/Python.
 
Implements a scikit-learn-compatible base estimator wrapping server-side ML.
é)ÚOptionalÚUnionN)Ú BaseEstimator)ÚMySQLConnectionAbstract)ÚML_TASKÚMyModel)Ú    copy_dictc
ó¨—eZdZdZ        ddedeeefdeedee    fd„Z
    dde jd    ee jd
dfd „Z d
efd „Zd
ee    fd „Zy)Ú MyBaseMLModela
    Base class for MySQL HeatWave machine learning estimators.
 
    Implements the scikit-learn API and core model management logic,
    including fit, explain, serialization, and dynamic option handling.
    For use as a base class by classifiers, regressors, transformers, and outlier models.
 
    Args:
        db_connection (MySQLConnectionAbstract): An active MySQL connector database connection.
        task (str): ML task type, e.g. "classification" or "regression".
        model_name (str, optional): Custom name for the deployed model.
        fit_extra_options (dict, optional): Extra options for fitting.
 
    Attributes:
        _model: Underlying database helper for fit/predict/explain.
        fit_extra_options: User-provided options for fitting.
    NÚ db_connectionÚtaskÚ
model_nameÚfit_extra_optionscóJ—t|||¬«|_t|«|_y)a
        Initialize a MyBaseMLModel with connection, task, and option parameters.
 
        Args:
            db_connection: Active MySQL connector database connection.
            task: String label of ML task (e.g. "classification").
            model_name: Optional custom model name.
            fit_extra_options: Optional extra fit options.
 
        Raises:
            DatabaseError:
                If a database connection issue occurs.
                If an operational error occurs during execution.
        )r rN)rÚ_modelr    r)Úselfr r rrs     úCH:\Change_password\venv_build\Lib\site-packages\mysql/ai/ml/base.pyÚ__init__zMyBaseMLModel.__init__?s"€ô*˜m°$À:ÔNˆŒ Ü!*Ð+<Ó!=ˆÕóÚXÚyÚreturncóT—|jj|||j«|S)aZ
        Fit the underlying ML model using pandas DataFrames.
        Delegates to MyMLModelPandasHelper.fit.
 
        Args:
            X: Features DataFrame.
            y: (Optional) Target labels DataFrame or Series.
 
        Returns:
            self
 
        Raises:
            DatabaseError:
                If provided options are invalid or unsupported.
                If a database connection issue occurs.
                If an operational error occurs during execution.
 
        Notes:
            Additional temp SQL resources may be created and cleaned up during the operation.
        )rÚfitr)rrrs   rrzMyBaseMLModel.fitWs#€ð2      ‰ ‰˜˜1˜d×4Ñ4Ô5؈ rcó6—|jj«S)a%
        Deletes the model from the model catalog if present
 
        Raises:
            DatabaseError:
                If a database connection issue occurs.
                If an operational error occurs during execution.
 
        Returns:
            Whether the model was deleted
        )rÚ _delete_model©rs rrzMyBaseMLModel._delete_modelss€ð{‰{×(Ñ(Ó*Ð*rcó6—|jj«S)a’
        Checks if the model name is available. Model info will only be present in the
        catalog if the model has previously been fitted.
 
        Returns:
            True if the model name is not part of the model catalog
 
        Raises:
            DatabaseError:
                If a database connection issue occurs.
                If an operational error occurs during execution.
        )rÚget_model_infors rrzMyBaseMLModel.get_model_infos€ð{‰{×)Ñ)Ó+Ð+r)NN)N)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rrÚstrrrÚdictrÚpdÚ    DataFramerÚboolrr©rrr r ,sš„ñð,%)Ø,0ñ >à.ð>ðC˜LÑ!ð>ð˜S‘Mð    >ð
$ D™>ó >ð6%)ñà <‰<ðð B—L‘LÑ !ðð
ó    ð8 +˜tó +ð , ¨¡ô ,rr )r#ÚtypingrrÚpandasr&Ú sklearn.baserÚmysql.connector.abstractsrÚmysql.ai.ml.modelrrÚmysql.ai.utilsr    r r)rrú<module>r0s,ðñ:÷#ãå&å=ß.Ý$ôb,Mõb,r