Q1 : Which version of hana-ml should I install?¶
A1 : We recommend that you install the latest version of hana-ml no matter what version of SAP HANA you are using. For example, you could use the command "pip install hana-ml" for the first installation or the command 'pip install --upgrade hana-ml' for update.
Q2 : Why do I meet a 'matplotlib' error when I invoke box_plot()?¶
A2 : This issue may be caused by matplotlib version mismatch. The version of matplotlib required for hana-ml 2.6.201016 is 3.1.3 and the latest matplotlib version 3.3.2 will cause errors as some APIs have been modified. This issue has been fixed in hana-ml 2.6.20110600 which could work with matplotlib 3.3.2.
Q3 : Why do I meet a error "[WinError 126] The specified module could not be found" when I import hana-ml?¶
A3 : This error happens for Windows users if they have installed Shapely with pip install command in the conda environment. Current solution is to use "conda install -c conda-forge shapely" to install Shapely.
Q4 : What dependencies are required for hana-ml?¶
A4 : If you use pip command to install hana-ml, all dependencies from PyPI are installed by default. Sepecial case is as follows:
Shapely. If you want to use spatial and graph features, please install Shapely. If you use conda environment in Windows, please refer to Q3 for installation.
Q5 : How to solve the garbled Chinese font problem like □□, when I use library 'Matplotlib'?¶
A5 : To solve the issue, you need to configure the Chinese font for Matplotlib. Please follow the steps below:
Download and unpack the Chinese font zip. https://github.com/be5invis/source-han-sans-ttf/releases/download/v2.002.1/source-han-sans-ttf-2.002.1.7z
Find the font file 'SourceHanSansSC-Normal.ttf'.
Copy this file to the path '~/site-packages/matplotlib/mpl-data/fonts/ttf'.
Restart your notebook to make it work.
Q6 : Why the output of FeatureNormalizer and KBinsDiscretizer is not what I expect? For example, the transformed value is a integer when a float is expected in FeatureNormalizer.¶
A6 : In these two functions, the data type of the output value is the same as that of the input value. Therefore, if the data type of the original data is integer, the output value will be converted to an integer instead of the result you expect.
The solution is to cast the feature column(s) from INTEGER to DOUBLE before invoking these functions.
Q7 : How could I solve the "RuntimeError: Failed to transform image object to string!", when I use UnifiedReport?¶
A7 : This issue may be caused by the low version of Matplotlib. Please try to upgrade the version above 3.4.0.
Q8 : How could I solve the issue "KeyError: 'STORAGE_TYPE'" when I use model storage functionalites after I upgrade hana-ml to version 2.9.21XXXX?¶
A8 : This issue is caused by the upgrade of model storage module. The solution is to invoke a new function upgrade_meta() of a ModelStorage object to update the meta table. This new function upgrade_meta() is available in hana-ml 2.9.210630.
Q9 : Why do I meet a error message like "SAP DBTech JDBC: : invalid name of function or procedure: no procedure with name XXX found:"?¶
A9: This error message means there is no such function supported in your SAP HANA instance although hana-ml offers such function. Similar, some new added parameters do not work on the SAP HANA instance with older version. Please refer the conresponding version of PAL documentation of your HANA instance for more details.
Examples of documentation links are below:
For example, the following functions are not available in SAP HANA SPS05:
Q10 : Why do I meet a error "'NoneType' object has no attribute 'connection'" when I use model storage functionality for ARIMA/AutoARIMA in predict function?¶
A10 : This issue has been fixed in hana-ml 2.6.20110600. If you use a lower version of hana-ml, please use set_conn() explicitly after loading ARIMA/AutoARIMA model to set the connection to SAP HANA. ARIMA/AutoARIMA is a special case for model storage because it does not require data input for prediction.