teradataml 20.0.0.5__py3-none-any.whl → 20.0.0.7__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 +306 -0
- teradataml/__init__.py +1 -1
- teradataml/_version.py +1 -1
- teradataml/analytics/analytic_function_executor.py +162 -76
- teradataml/analytics/byom/__init__.py +1 -1
- teradataml/analytics/json_parser/__init__.py +2 -0
- teradataml/analytics/json_parser/analytic_functions_argument.py +95 -2
- teradataml/analytics/json_parser/metadata.py +22 -4
- teradataml/analytics/sqle/DecisionTreePredict.py +3 -2
- teradataml/analytics/sqle/NaiveBayesPredict.py +3 -2
- teradataml/analytics/sqle/__init__.py +3 -0
- teradataml/analytics/utils.py +59 -11
- teradataml/automl/__init__.py +2369 -464
- teradataml/automl/autodataprep/__init__.py +15 -0
- teradataml/automl/custom_json_utils.py +184 -112
- teradataml/automl/data_preparation.py +113 -58
- teradataml/automl/data_transformation.py +154 -53
- teradataml/automl/feature_engineering.py +113 -53
- teradataml/automl/feature_exploration.py +548 -25
- teradataml/automl/model_evaluation.py +260 -32
- teradataml/automl/model_training.py +399 -206
- teradataml/clients/auth_client.py +10 -6
- teradataml/clients/keycloak_client.py +165 -0
- teradataml/common/aed_utils.py +11 -2
- teradataml/common/bulk_exposed_utils.py +4 -2
- teradataml/common/constants.py +72 -2
- teradataml/common/exceptions.py +32 -0
- teradataml/common/garbagecollector.py +50 -21
- teradataml/common/messagecodes.py +73 -1
- teradataml/common/messages.py +27 -1
- teradataml/common/sqlbundle.py +25 -7
- teradataml/common/utils.py +210 -22
- teradataml/context/aed_context.py +16 -10
- teradataml/context/context.py +37 -9
- teradataml/data/Employee.csv +5 -0
- teradataml/data/Employee_Address.csv +4 -0
- teradataml/data/Employee_roles.csv +5 -0
- teradataml/data/JulesBelvezeDummyData.csv +100 -0
- teradataml/data/byom_example.json +5 -0
- teradataml/data/creditcard_data.csv +284618 -0
- teradataml/data/docs/byom/docs/ONNXSeq2Seq.py +255 -0
- teradataml/data/docs/sqle/docs_17_10/NGramSplitter.py +1 -1
- teradataml/data/docs/sqle/docs_17_20/NGramSplitter.py +1 -1
- teradataml/data/docs/sqle/docs_17_20/TextParser.py +1 -1
- teradataml/data/jsons/byom/ONNXSeq2Seq.json +287 -0
- teradataml/data/jsons/byom/onnxembeddings.json +1 -0
- teradataml/data/jsons/sqle/20.00/AI_AnalyzeSentiment.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_AskLLM.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_DetectLanguage.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_ExtractKeyPhrases.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_MaskPII.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_RecognizeEntities.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_RecognizePIIEntities.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_TextClassifier.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_TextEmbeddings.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_TextSummarize.json +3 -7
- teradataml/data/jsons/sqle/20.00/AI_TextTranslate.json +3 -7
- teradataml/data/jsons/sqle/20.00/TD_API_AzureML.json +151 -0
- teradataml/data/jsons/sqle/20.00/TD_API_Sagemaker.json +182 -0
- teradataml/data/jsons/sqle/20.00/TD_API_VertexAI.json +183 -0
- teradataml/data/load_example_data.py +29 -11
- teradataml/data/pattern_matching_data.csv +11 -0
- teradataml/data/payment_fraud_dataset.csv +10001 -0
- teradataml/data/sdk/modelops/modelops_spec.json +101737 -0
- teradataml/data/teradataml_example.json +75 -1
- teradataml/data/url_data.csv +10 -9
- teradataml/dataframe/copy_to.py +715 -55
- teradataml/dataframe/dataframe.py +2115 -97
- teradataml/dataframe/dataframe_utils.py +66 -28
- teradataml/dataframe/functions.py +1130 -2
- teradataml/dataframe/setop.py +4 -1
- teradataml/dataframe/sql.py +710 -1039
- teradataml/dbutils/dbutils.py +470 -35
- teradataml/dbutils/filemgr.py +1 -1
- teradataml/hyperparameter_tuner/optimizer.py +456 -142
- teradataml/hyperparameter_tuner/utils.py +4 -2
- teradataml/lib/aed_0_1.dll +0 -0
- teradataml/lib/libaed_0_1.dylib +0 -0
- teradataml/lib/libaed_0_1.so +0 -0
- teradataml/lib/libaed_0_1_aarch64.so +0 -0
- teradataml/opensource/_base.py +7 -1
- teradataml/options/configure.py +20 -4
- teradataml/scriptmgmt/UserEnv.py +247 -36
- teradataml/scriptmgmt/lls_utils.py +140 -39
- teradataml/sdk/README.md +79 -0
- teradataml/sdk/__init__.py +4 -0
- teradataml/sdk/_auth_modes.py +422 -0
- teradataml/sdk/_func_params.py +487 -0
- teradataml/sdk/_json_parser.py +453 -0
- teradataml/sdk/_openapi_spec_constants.py +249 -0
- teradataml/sdk/_utils.py +236 -0
- teradataml/sdk/api_client.py +900 -0
- teradataml/sdk/constants.py +62 -0
- teradataml/sdk/modelops/__init__.py +98 -0
- teradataml/sdk/modelops/_client.py +409 -0
- teradataml/sdk/modelops/_constants.py +304 -0
- teradataml/sdk/modelops/models.py +2308 -0
- teradataml/sdk/spinner.py +107 -0
- teradataml/series/series.py +12 -7
- teradataml/store/feature_store/constants.py +601 -234
- teradataml/store/feature_store/feature_store.py +2886 -616
- teradataml/store/feature_store/mind_map.py +639 -0
- teradataml/store/feature_store/models.py +5831 -214
- teradataml/store/feature_store/utils.py +390 -0
- teradataml/table_operators/query_generator.py +4 -21
- teradataml/table_operators/table_operator_util.py +1 -1
- teradataml/table_operators/templates/dataframe_register.template +6 -2
- teradataml/table_operators/templates/dataframe_udf.template +6 -2
- teradataml/utils/docstring.py +527 -0
- teradataml/utils/dtypes.py +95 -1
- teradataml/utils/internal_buffer.py +2 -2
- teradataml/utils/utils.py +41 -3
- teradataml/utils/validators.py +699 -18
- {teradataml-20.0.0.5.dist-info → teradataml-20.0.0.7.dist-info}/METADATA +312 -2
- {teradataml-20.0.0.5.dist-info → teradataml-20.0.0.7.dist-info}/RECORD +119 -87
- {teradataml-20.0.0.5.dist-info → teradataml-20.0.0.7.dist-info}/WHEEL +0 -0
- {teradataml-20.0.0.5.dist-info → teradataml-20.0.0.7.dist-info}/top_level.txt +0 -0
- {teradataml-20.0.0.5.dist-info → teradataml-20.0.0.7.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# ################################################################################################
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2025 Teradata. All rights reserved.
|
|
4
|
+
# TERADATA CONFIDENTIAL AND TRADE SECRET
|
|
5
|
+
#
|
|
6
|
+
# Primary Owner: Adithya Avvaru (adithya.avvaru@teradata.com)
|
|
7
|
+
# Secondary Owner: Pankaj Purandare (pankajvinod.purandare@teradata.com)
|
|
8
|
+
#
|
|
9
|
+
# Version: 1.0
|
|
10
|
+
# ModelOps SDK Version: 1.0
|
|
11
|
+
#
|
|
12
|
+
# This file contains the code for spinner which spins during the SDK execution time.
|
|
13
|
+
# NOTE: This is taken from AoA SDK and will be updated/removed in future.
|
|
14
|
+
#
|
|
15
|
+
# ################################################################################################
|
|
16
|
+
|
|
17
|
+
import os
|
|
18
|
+
import sys
|
|
19
|
+
import threading
|
|
20
|
+
|
|
21
|
+
os.system("") # enables ansi escape characters in terminal
|
|
22
|
+
|
|
23
|
+
CODE = {
|
|
24
|
+
"CYAN": "\033[36m",
|
|
25
|
+
"END": "\033[0m",
|
|
26
|
+
"RM_LINE": "\033[2K\r",
|
|
27
|
+
"HIDE_CURSOR": "\033[?25l",
|
|
28
|
+
"SHOW_CURSOR": "\033[?25h",
|
|
29
|
+
"CURSOR_NEXT_LINE": "\033[1E",
|
|
30
|
+
"CURSOR_INIT": "\033[0G",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ProgressBase(threading.Thread):
|
|
35
|
+
inplace = None
|
|
36
|
+
stopFlag = None
|
|
37
|
+
|
|
38
|
+
def __init__(self):
|
|
39
|
+
self.rlock = threading.RLock()
|
|
40
|
+
self.cv = threading.Condition()
|
|
41
|
+
threading.Thread.__init__(self)
|
|
42
|
+
self.setDaemon(True)
|
|
43
|
+
|
|
44
|
+
def __call__(self):
|
|
45
|
+
self.start()
|
|
46
|
+
|
|
47
|
+
def back_step(self):
|
|
48
|
+
if self.inplace:
|
|
49
|
+
sys_print(CODE["CURSOR_NEXT_LINE"])
|
|
50
|
+
|
|
51
|
+
def remove_line(self):
|
|
52
|
+
if self.inplace:
|
|
53
|
+
sys_print(CODE["RM_LINE"])
|
|
54
|
+
|
|
55
|
+
def start(self):
|
|
56
|
+
self.stopFlag = 0
|
|
57
|
+
threading.Thread.start(self)
|
|
58
|
+
|
|
59
|
+
def stop(self):
|
|
60
|
+
self.stopFlag = 1
|
|
61
|
+
sys_print(CODE["SHOW_CURSOR"])
|
|
62
|
+
self.cv.acquire()
|
|
63
|
+
self.cv.notify()
|
|
64
|
+
self.cv.release()
|
|
65
|
+
self.rlock.acquire()
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class Spinner(ProgressBase):
|
|
69
|
+
|
|
70
|
+
def __init__(self, msg="", speed=0.1):
|
|
71
|
+
self.__seq = ["⣾", "⣷", "⣯", "⣟", "⡿", "⢿", "⣻", "⣽"]
|
|
72
|
+
self.__speed = speed
|
|
73
|
+
self.__msg = msg
|
|
74
|
+
self.inplace = 1
|
|
75
|
+
ProgressBase.__init__(self)
|
|
76
|
+
|
|
77
|
+
def run(self):
|
|
78
|
+
self.rlock.acquire()
|
|
79
|
+
self.cv.acquire()
|
|
80
|
+
sys_print(CODE["HIDE_CURSOR"])
|
|
81
|
+
while 1:
|
|
82
|
+
for char in self.__seq:
|
|
83
|
+
self.cv.wait(self.__speed)
|
|
84
|
+
if self.stopFlag:
|
|
85
|
+
self.back_step()
|
|
86
|
+
try:
|
|
87
|
+
return
|
|
88
|
+
finally:
|
|
89
|
+
self.rlock.release()
|
|
90
|
+
if self.inplace:
|
|
91
|
+
sys_print(
|
|
92
|
+
f"{CODE['CYAN']}{char}{CODE['END']} {self.__msg}{CODE['CURSOR_INIT']}"
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def sys_print(msg):
|
|
97
|
+
sys.stdout.write(msg)
|
|
98
|
+
sys.stdout.flush()
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def spin_it(function, msg, speed=0.25, *args, **kwargs):
|
|
102
|
+
indicator = Spinner(msg, speed)
|
|
103
|
+
indicator.start()
|
|
104
|
+
result = function(*args, **kwargs)
|
|
105
|
+
indicator.stop()
|
|
106
|
+
indicator.remove_line()
|
|
107
|
+
return result
|
teradataml/series/series.py
CHANGED
|
@@ -78,6 +78,7 @@ class Series:
|
|
|
78
78
|
# Optional arguments
|
|
79
79
|
self._df_orderby = kw.pop('order_by', None)
|
|
80
80
|
self._df_index_label = kw.pop('index_label', None)
|
|
81
|
+
self._datalake = kw.pop('datalake', None)
|
|
81
82
|
|
|
82
83
|
# Derived attributes
|
|
83
84
|
# Note that this is considering we have only one column,
|
|
@@ -92,7 +93,8 @@ class Series:
|
|
|
92
93
|
self._aed_utils = AedUtils()
|
|
93
94
|
self._metaexpr = UtilFuncs._get_metaexpr_using_columns(nodeid,
|
|
94
95
|
zip([self._name],
|
|
95
|
-
[self._col.type])
|
|
96
|
+
[self._col.type]),
|
|
97
|
+
datalake=self._datalake)
|
|
96
98
|
|
|
97
99
|
except TeradataMlException:
|
|
98
100
|
raise
|
|
@@ -101,7 +103,7 @@ class Series:
|
|
|
101
103
|
MessageCodes.SERIES_CREATE_FAIL) from err
|
|
102
104
|
|
|
103
105
|
@classmethod
|
|
104
|
-
def _from_node(cls, axis, nodeid, col, df_orderby = None, df_index_label = None):
|
|
106
|
+
def _from_node(cls, axis, nodeid, col, df_orderby = None, df_index_label = None, **kw):
|
|
105
107
|
"""
|
|
106
108
|
DESCRIPTION:
|
|
107
109
|
Private class method for creating a teradataml Series from a nodeid, and parent metadata.
|
|
@@ -149,7 +151,8 @@ class Series:
|
|
|
149
151
|
nodeid,
|
|
150
152
|
col,
|
|
151
153
|
order_by = df_orderby,
|
|
152
|
-
index_label = df_index_label
|
|
154
|
+
index_label = df_index_label,
|
|
155
|
+
datalake=kw.pop("datalake", None))
|
|
153
156
|
|
|
154
157
|
return series
|
|
155
158
|
|
|
@@ -195,8 +198,9 @@ class Series:
|
|
|
195
198
|
series = cls(axis,
|
|
196
199
|
df._nodeid,
|
|
197
200
|
df._metaexpr.c[0],
|
|
198
|
-
order_by
|
|
199
|
-
index_label
|
|
201
|
+
order_by=df._orderby,
|
|
202
|
+
index_label=df._index_label,
|
|
203
|
+
datalake=df._metaexpr.datalake)
|
|
200
204
|
|
|
201
205
|
return series
|
|
202
206
|
|
|
@@ -244,7 +248,6 @@ class Series:
|
|
|
244
248
|
"""
|
|
245
249
|
# TODO : Change docstring based on implementation of RowBased Series object
|
|
246
250
|
query = repr(self._metaexpr) + ' FROM ' + self._get_table_name()
|
|
247
|
-
|
|
248
251
|
if self._df_orderby is not None:
|
|
249
252
|
query += ' ORDER BY ' + self._df_orderby
|
|
250
253
|
|
|
@@ -449,7 +452,9 @@ class Series:
|
|
|
449
452
|
assign_expression,
|
|
450
453
|
AEDConstants.AED_ASSIGN_DROP_EXISITING_COLUMNS.value)
|
|
451
454
|
|
|
452
|
-
return Series._from_node(self._axis, new_nodeid, new_meta.c[0],
|
|
455
|
+
return Series._from_node(self._axis, new_nodeid, new_meta.c[0],
|
|
456
|
+
self._df_orderby, self._df_index_label,
|
|
457
|
+
datalake=self._metaexpr.datalake)
|
|
453
458
|
|
|
454
459
|
except TeradataMlException:
|
|
455
460
|
raise
|