teradataml 20.0.0.2__py3-none-any.whl → 20.0.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of teradataml might be problematic. Click here for more details.
- teradataml/LICENSE-3RD-PARTY.pdf +0 -0
- teradataml/README.md +315 -2
- teradataml/__init__.py +4 -0
- teradataml/_version.py +1 -1
- teradataml/analytics/analytic_function_executor.py +95 -8
- teradataml/analytics/byom/__init__.py +1 -1
- teradataml/analytics/json_parser/metadata.py +12 -3
- teradataml/analytics/json_parser/utils.py +7 -2
- teradataml/analytics/sqle/__init__.py +5 -1
- teradataml/analytics/table_operator/__init__.py +1 -1
- teradataml/analytics/uaf/__init__.py +1 -1
- teradataml/analytics/utils.py +4 -0
- teradataml/analytics/valib.py +18 -4
- teradataml/automl/__init__.py +51 -6
- teradataml/automl/data_preparation.py +59 -35
- teradataml/automl/data_transformation.py +58 -33
- teradataml/automl/feature_engineering.py +27 -12
- teradataml/automl/model_training.py +73 -46
- teradataml/common/constants.py +88 -29
- teradataml/common/garbagecollector.py +2 -1
- teradataml/common/messagecodes.py +19 -3
- teradataml/common/messages.py +6 -1
- teradataml/common/sqlbundle.py +64 -12
- teradataml/common/utils.py +246 -47
- teradataml/common/warnings.py +11 -0
- teradataml/context/context.py +161 -27
- teradataml/data/amazon_reviews_25.csv +26 -0
- teradataml/data/byom_example.json +11 -0
- teradataml/data/dataframe_example.json +18 -2
- teradataml/data/docs/byom/docs/DataRobotPredict.py +2 -2
- teradataml/data/docs/byom/docs/DataikuPredict.py +40 -1
- teradataml/data/docs/byom/docs/H2OPredict.py +2 -2
- teradataml/data/docs/byom/docs/ONNXEmbeddings.py +242 -0
- teradataml/data/docs/byom/docs/ONNXPredict.py +2 -2
- teradataml/data/docs/byom/docs/PMMLPredict.py +2 -2
- teradataml/data/docs/sqle/docs_17_20/NaiveBayes.py +1 -1
- teradataml/data/docs/sqle/docs_17_20/Shap.py +34 -6
- teradataml/data/docs/sqle/docs_17_20/TDNaiveBayesPredict.py +4 -4
- teradataml/data/docs/sqle/docs_17_20/TextParser.py +3 -3
- teradataml/data/docs/tableoperator/docs_17_20/Image2Matrix.py +118 -0
- teradataml/data/docs/uaf/docs_17_20/CopyArt.py +145 -0
- teradataml/data/docs/uaf/docs_17_20/DWT2D.py +4 -1
- teradataml/data/docs/uaf/docs_17_20/DickeyFuller.py +18 -21
- teradataml/data/hnsw_alter_data.csv +5 -0
- teradataml/data/hnsw_data.csv +10 -0
- teradataml/data/jsons/byom/h2opredict.json +1 -1
- teradataml/data/jsons/byom/onnxembeddings.json +266 -0
- teradataml/data/jsons/sqle/17.20/TD_Shap.json +0 -1
- teradataml/data/jsons/sqle/17.20/TD_TextParser.json +1 -1
- teradataml/data/jsons/sqle/20.00/TD_HNSW.json +296 -0
- teradataml/data/jsons/sqle/20.00/TD_HNSWPredict.json +206 -0
- teradataml/data/jsons/sqle/20.00/TD_HNSWSummary.json +32 -0
- teradataml/data/jsons/sqle/20.00/TD_KMeans.json +250 -0
- teradataml/data/jsons/sqle/20.00/TD_SMOTE.json +266 -0
- teradataml/data/jsons/sqle/20.00/TD_VectorDistance.json +278 -0
- teradataml/data/jsons/storedprocedure/17.20/TD_COPYART.json +71 -0
- teradataml/data/jsons/tableoperator/17.20/IMAGE2MATRIX.json +53 -0
- teradataml/data/jsons/uaf/17.20/TD_DICKEY_FULLER.json +10 -19
- teradataml/data/jsons/uaf/17.20/TD_SAX.json +3 -1
- teradataml/data/jsons/uaf/17.20/TD_WINDOWDFFT.json +15 -5
- teradataml/data/medical_readings.csv +101 -0
- teradataml/data/patient_profile.csv +101 -0
- teradataml/data/scripts/lightgbm/dataset.template +157 -0
- teradataml/data/scripts/lightgbm/lightgbm_class_functions.template +247 -0
- teradataml/data/scripts/lightgbm/lightgbm_function.template +216 -0
- teradataml/data/scripts/lightgbm/lightgbm_sklearn.template +159 -0
- teradataml/data/scripts/sklearn/sklearn_fit.py +194 -167
- teradataml/data/scripts/sklearn/sklearn_fit_predict.py +136 -115
- teradataml/data/scripts/sklearn/sklearn_function.template +14 -19
- teradataml/data/scripts/sklearn/sklearn_model_selection_split.py +155 -137
- teradataml/data/scripts/sklearn/sklearn_transform.py +129 -42
- teradataml/data/target_udt_data.csv +8 -0
- teradataml/data/templates/open_source_ml.json +3 -2
- teradataml/data/teradataml_example.json +8 -0
- teradataml/data/vectordistance_example.json +4 -0
- teradataml/dataframe/copy_to.py +8 -3
- teradataml/dataframe/data_transfer.py +11 -1
- teradataml/dataframe/dataframe.py +1049 -285
- teradataml/dataframe/dataframe_utils.py +152 -20
- teradataml/dataframe/functions.py +578 -35
- teradataml/dataframe/setop.py +11 -6
- teradataml/dataframe/sql.py +185 -16
- teradataml/dbutils/dbutils.py +1049 -115
- teradataml/dbutils/filemgr.py +48 -1
- teradataml/hyperparameter_tuner/optimizer.py +12 -1
- teradataml/lib/aed_0_1.dll +0 -0
- teradataml/opensource/__init__.py +1 -1
- teradataml/opensource/_base.py +1466 -0
- teradataml/opensource/_class.py +464 -0
- teradataml/opensource/{sklearn/constants.py → _constants.py} +21 -14
- teradataml/opensource/_lightgbm.py +949 -0
- teradataml/opensource/_sklearn.py +1008 -0
- teradataml/opensource/{sklearn/_wrapper_utils.py → _wrapper_utils.py} +5 -6
- teradataml/options/__init__.py +54 -38
- teradataml/options/configure.py +131 -27
- teradataml/options/display.py +13 -2
- teradataml/plot/axis.py +47 -8
- teradataml/plot/figure.py +33 -0
- teradataml/plot/plot.py +63 -13
- teradataml/scriptmgmt/UserEnv.py +5 -5
- teradataml/scriptmgmt/lls_utils.py +130 -40
- teradataml/store/__init__.py +12 -0
- teradataml/store/feature_store/__init__.py +0 -0
- teradataml/store/feature_store/constants.py +291 -0
- teradataml/store/feature_store/feature_store.py +2318 -0
- teradataml/store/feature_store/models.py +1505 -0
- teradataml/table_operators/Apply.py +32 -18
- teradataml/table_operators/Script.py +3 -1
- teradataml/table_operators/TableOperator.py +3 -1
- teradataml/table_operators/query_generator.py +3 -0
- teradataml/table_operators/table_operator_query_generator.py +3 -1
- teradataml/table_operators/table_operator_util.py +37 -38
- teradataml/table_operators/templates/dataframe_register.template +69 -0
- teradataml/utils/dtypes.py +51 -2
- teradataml/utils/internal_buffer.py +18 -0
- teradataml/utils/validators.py +99 -8
- {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/METADATA +321 -5
- {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/RECORD +121 -94
- teradataml/libaed_0_1.dylib +0 -0
- teradataml/libaed_0_1.so +0 -0
- teradataml/opensource/sklearn/__init__.py +0 -1
- teradataml/opensource/sklearn/_class.py +0 -255
- teradataml/opensource/sklearn/_sklearn_wrapper.py +0 -1800
- {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/WHEEL +0 -0
- {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/top_level.txt +0 -0
- {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/zip-safe +0 -0
teradataml/dbutils/filemgr.py
CHANGED
|
@@ -15,12 +15,16 @@ import os
|
|
|
15
15
|
from pathlib import Path
|
|
16
16
|
from sqlalchemy import func
|
|
17
17
|
from sqlalchemy.sql.expression import text
|
|
18
|
+
import teradataml.dataframe as tdmldf
|
|
19
|
+
from teradataml.utils.internal_buffer import _InternalBuffer
|
|
18
20
|
from teradatasql import OperationalError as SqlOperationalError
|
|
19
21
|
from teradataml.common.exceptions import TeradataMlException
|
|
20
22
|
from teradataml.common.messages import Messages
|
|
21
23
|
from teradataml.common.messagecodes import MessageCodes
|
|
22
|
-
from teradataml.dbutils.dbutils import _execute_stored_procedure
|
|
24
|
+
from teradataml.dbutils.dbutils import _execute_stored_procedure, set_session_param
|
|
23
25
|
from teradataml.utils.validators import _Validators
|
|
26
|
+
from teradataml.options.configure import configure
|
|
27
|
+
from teradataml.common.constants import TableOperatorConstants
|
|
24
28
|
|
|
25
29
|
def install_file(file_identifier, file_path = None, file_on_client = True, is_binary = False,
|
|
26
30
|
replace = False, force_replace = False, suppress_output = False):
|
|
@@ -265,3 +269,46 @@ def remove_file(file_identifier, force_remove = None, suppress_output = False):
|
|
|
265
269
|
raise TeradataMlException(Messages.get_message(MessageCodes.REMOVE_FILE_FAILED, file_identifier) +
|
|
266
270
|
'\n' + str(err),
|
|
267
271
|
MessageCodes.REMOVE_FILE_FAILED)
|
|
272
|
+
|
|
273
|
+
def list_files():
|
|
274
|
+
"""
|
|
275
|
+
DESCRIPTION:
|
|
276
|
+
List all the files installed in Vantage or in Vantage Languages Ecosystem.
|
|
277
|
+
|
|
278
|
+
PARAMETERS:
|
|
279
|
+
None
|
|
280
|
+
|
|
281
|
+
RETURNS:
|
|
282
|
+
teradataml DataFrame
|
|
283
|
+
|
|
284
|
+
RAISES:
|
|
285
|
+
TeradataMLException.
|
|
286
|
+
|
|
287
|
+
EXAMPLES:
|
|
288
|
+
# Example 1: List files installed in the Vantage Ecosystem.
|
|
289
|
+
# Install the file mapper.py found at the relative path data/scripts/
|
|
290
|
+
>>> install_file (file_identifier='mapper', file_path='data/scripts/mapper.py')
|
|
291
|
+
File mapper.py installed in Vantage
|
|
292
|
+
|
|
293
|
+
# List file installed in the Vantage Ecosystem.
|
|
294
|
+
>>> list_files()
|
|
295
|
+
Files
|
|
296
|
+
0 mapper.py
|
|
297
|
+
"""
|
|
298
|
+
# Get the current database name.
|
|
299
|
+
import teradataml.context.context as context
|
|
300
|
+
database = context._get_current_databasename()
|
|
301
|
+
|
|
302
|
+
# set_session_param maintains a buffer of session parameters.
|
|
303
|
+
# If the session parameter is not set or if setted SearchUIFDBPath is different
|
|
304
|
+
# from the current database, then we will set the SEARCHUIFDBPATH to the current
|
|
305
|
+
# database. This will avoid setting the SEARCHUIFDBPATH multiple times.
|
|
306
|
+
session_params = _InternalBuffer.get('session_params')
|
|
307
|
+
if session_params is None or session_params["SearchUIFDBPath"] != database:
|
|
308
|
+
set_session_param("SEARCHUIFDBPATH", database)
|
|
309
|
+
|
|
310
|
+
# Get the query to list files installed in Vantage.
|
|
311
|
+
list_files_query = TableOperatorConstants.SCRIPT_LIST_FILES_QUERY.value \
|
|
312
|
+
.format(database, configure.default_varchar_size)
|
|
313
|
+
|
|
314
|
+
return tdmldf.dataframe.DataFrame.from_query(list_files_query)
|
|
@@ -25,6 +25,8 @@ from teradataml.common.messages import Messages, MessageCodes
|
|
|
25
25
|
from teradataml.hyperparameter_tuner.utils import _ProgressBar
|
|
26
26
|
from teradataml.utils.utils import _AsyncDBExecutor
|
|
27
27
|
from teradataml.utils.validators import _Validators
|
|
28
|
+
from teradataml.options.configure import configure
|
|
29
|
+
from teradataml.common.constants import TeradataConstants
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
class _BaseSearch:
|
|
@@ -1287,7 +1289,8 @@ class _BaseSearch:
|
|
|
1287
1289
|
# Initialize logging.
|
|
1288
1290
|
if verbose > 0:
|
|
1289
1291
|
self.__progress_bar = _ProgressBar(jobs=len(self._parameter_grid), verbose=verbose)
|
|
1290
|
-
|
|
1292
|
+
# With VT option Parallel execution won't be possible, as it opens multiple connections.
|
|
1293
|
+
if not run_parallel or configure.temp_object_type == TeradataConstants.TERADATA_VOLATILE_TABLE:
|
|
1291
1294
|
# Setting start time of Sequential execution.
|
|
1292
1295
|
self.__start_time = time.time() if self.__timeout is not None else None
|
|
1293
1296
|
# TODO: Factorize the code once parallel execution part is completed in ELE-6154 JIRA.
|
|
@@ -1339,6 +1342,10 @@ class _BaseSearch:
|
|
|
1339
1342
|
self.__start_time = time.time() if self.__timeout is not None else None
|
|
1340
1343
|
# Trigger parallel thread execution.
|
|
1341
1344
|
self._async_executor.submit(self._execute_fit, *async_exec_params)
|
|
1345
|
+
|
|
1346
|
+
if len(self.__model_err_records) > 0 and not kwargs.get('suppress_refer_msg', False):
|
|
1347
|
+
print('\nAn error occurred during Model Training.'\
|
|
1348
|
+
' Refer to get_error_log() for more details.')
|
|
1342
1349
|
|
|
1343
1350
|
|
|
1344
1351
|
def __model_trainer_routine(self, model_param, iter, **kwargs):
|
|
@@ -2272,6 +2279,8 @@ class GridSearch(_BaseSearch):
|
|
|
2272
2279
|
set of data as hyperparameter for model trainer function, the search
|
|
2273
2280
|
determines the best data along with the best model based on the
|
|
2274
2281
|
evaluation metrics.
|
|
2282
|
+
Note:
|
|
2283
|
+
* configure.temp_object_type="VT" follows sequential execution.
|
|
2275
2284
|
|
|
2276
2285
|
PARAMETERS:
|
|
2277
2286
|
func:
|
|
@@ -3196,6 +3205,8 @@ class RandomSearch(_BaseSearch):
|
|
|
3196
3205
|
set of data as hyperparameter for model trainer function, the search
|
|
3197
3206
|
determines the best data along with the best model based on the
|
|
3198
3207
|
evaluation metrics.
|
|
3208
|
+
Note:
|
|
3209
|
+
* configure.temp_object_type="VT" follows sequential execution.
|
|
3199
3210
|
|
|
3200
3211
|
PARAMETERS:
|
|
3201
3212
|
func:
|
teradataml/lib/aed_0_1.dll
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
from teradataml.opensource.
|
|
1
|
+
from teradataml.opensource._class import td_sklearn, td_lightgbm
|