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.

Files changed (126) hide show
  1. teradataml/LICENSE-3RD-PARTY.pdf +0 -0
  2. teradataml/README.md +315 -2
  3. teradataml/__init__.py +4 -0
  4. teradataml/_version.py +1 -1
  5. teradataml/analytics/analytic_function_executor.py +95 -8
  6. teradataml/analytics/byom/__init__.py +1 -1
  7. teradataml/analytics/json_parser/metadata.py +12 -3
  8. teradataml/analytics/json_parser/utils.py +7 -2
  9. teradataml/analytics/sqle/__init__.py +5 -1
  10. teradataml/analytics/table_operator/__init__.py +1 -1
  11. teradataml/analytics/uaf/__init__.py +1 -1
  12. teradataml/analytics/utils.py +4 -0
  13. teradataml/analytics/valib.py +18 -4
  14. teradataml/automl/__init__.py +51 -6
  15. teradataml/automl/data_preparation.py +59 -35
  16. teradataml/automl/data_transformation.py +58 -33
  17. teradataml/automl/feature_engineering.py +27 -12
  18. teradataml/automl/model_training.py +73 -46
  19. teradataml/common/constants.py +88 -29
  20. teradataml/common/garbagecollector.py +2 -1
  21. teradataml/common/messagecodes.py +19 -3
  22. teradataml/common/messages.py +6 -1
  23. teradataml/common/sqlbundle.py +64 -12
  24. teradataml/common/utils.py +246 -47
  25. teradataml/common/warnings.py +11 -0
  26. teradataml/context/context.py +161 -27
  27. teradataml/data/amazon_reviews_25.csv +26 -0
  28. teradataml/data/byom_example.json +11 -0
  29. teradataml/data/dataframe_example.json +18 -2
  30. teradataml/data/docs/byom/docs/DataRobotPredict.py +2 -2
  31. teradataml/data/docs/byom/docs/DataikuPredict.py +40 -1
  32. teradataml/data/docs/byom/docs/H2OPredict.py +2 -2
  33. teradataml/data/docs/byom/docs/ONNXEmbeddings.py +242 -0
  34. teradataml/data/docs/byom/docs/ONNXPredict.py +2 -2
  35. teradataml/data/docs/byom/docs/PMMLPredict.py +2 -2
  36. teradataml/data/docs/sqle/docs_17_20/NaiveBayes.py +1 -1
  37. teradataml/data/docs/sqle/docs_17_20/Shap.py +34 -6
  38. teradataml/data/docs/sqle/docs_17_20/TDNaiveBayesPredict.py +4 -4
  39. teradataml/data/docs/sqle/docs_17_20/TextParser.py +3 -3
  40. teradataml/data/docs/tableoperator/docs_17_20/Image2Matrix.py +118 -0
  41. teradataml/data/docs/uaf/docs_17_20/CopyArt.py +145 -0
  42. teradataml/data/docs/uaf/docs_17_20/DWT2D.py +4 -1
  43. teradataml/data/docs/uaf/docs_17_20/DickeyFuller.py +18 -21
  44. teradataml/data/hnsw_alter_data.csv +5 -0
  45. teradataml/data/hnsw_data.csv +10 -0
  46. teradataml/data/jsons/byom/h2opredict.json +1 -1
  47. teradataml/data/jsons/byom/onnxembeddings.json +266 -0
  48. teradataml/data/jsons/sqle/17.20/TD_Shap.json +0 -1
  49. teradataml/data/jsons/sqle/17.20/TD_TextParser.json +1 -1
  50. teradataml/data/jsons/sqle/20.00/TD_HNSW.json +296 -0
  51. teradataml/data/jsons/sqle/20.00/TD_HNSWPredict.json +206 -0
  52. teradataml/data/jsons/sqle/20.00/TD_HNSWSummary.json +32 -0
  53. teradataml/data/jsons/sqle/20.00/TD_KMeans.json +250 -0
  54. teradataml/data/jsons/sqle/20.00/TD_SMOTE.json +266 -0
  55. teradataml/data/jsons/sqle/20.00/TD_VectorDistance.json +278 -0
  56. teradataml/data/jsons/storedprocedure/17.20/TD_COPYART.json +71 -0
  57. teradataml/data/jsons/tableoperator/17.20/IMAGE2MATRIX.json +53 -0
  58. teradataml/data/jsons/uaf/17.20/TD_DICKEY_FULLER.json +10 -19
  59. teradataml/data/jsons/uaf/17.20/TD_SAX.json +3 -1
  60. teradataml/data/jsons/uaf/17.20/TD_WINDOWDFFT.json +15 -5
  61. teradataml/data/medical_readings.csv +101 -0
  62. teradataml/data/patient_profile.csv +101 -0
  63. teradataml/data/scripts/lightgbm/dataset.template +157 -0
  64. teradataml/data/scripts/lightgbm/lightgbm_class_functions.template +247 -0
  65. teradataml/data/scripts/lightgbm/lightgbm_function.template +216 -0
  66. teradataml/data/scripts/lightgbm/lightgbm_sklearn.template +159 -0
  67. teradataml/data/scripts/sklearn/sklearn_fit.py +194 -167
  68. teradataml/data/scripts/sklearn/sklearn_fit_predict.py +136 -115
  69. teradataml/data/scripts/sklearn/sklearn_function.template +14 -19
  70. teradataml/data/scripts/sklearn/sklearn_model_selection_split.py +155 -137
  71. teradataml/data/scripts/sklearn/sklearn_transform.py +129 -42
  72. teradataml/data/target_udt_data.csv +8 -0
  73. teradataml/data/templates/open_source_ml.json +3 -2
  74. teradataml/data/teradataml_example.json +8 -0
  75. teradataml/data/vectordistance_example.json +4 -0
  76. teradataml/dataframe/copy_to.py +8 -3
  77. teradataml/dataframe/data_transfer.py +11 -1
  78. teradataml/dataframe/dataframe.py +1049 -285
  79. teradataml/dataframe/dataframe_utils.py +152 -20
  80. teradataml/dataframe/functions.py +578 -35
  81. teradataml/dataframe/setop.py +11 -6
  82. teradataml/dataframe/sql.py +185 -16
  83. teradataml/dbutils/dbutils.py +1049 -115
  84. teradataml/dbutils/filemgr.py +48 -1
  85. teradataml/hyperparameter_tuner/optimizer.py +12 -1
  86. teradataml/lib/aed_0_1.dll +0 -0
  87. teradataml/opensource/__init__.py +1 -1
  88. teradataml/opensource/_base.py +1466 -0
  89. teradataml/opensource/_class.py +464 -0
  90. teradataml/opensource/{sklearn/constants.py → _constants.py} +21 -14
  91. teradataml/opensource/_lightgbm.py +949 -0
  92. teradataml/opensource/_sklearn.py +1008 -0
  93. teradataml/opensource/{sklearn/_wrapper_utils.py → _wrapper_utils.py} +5 -6
  94. teradataml/options/__init__.py +54 -38
  95. teradataml/options/configure.py +131 -27
  96. teradataml/options/display.py +13 -2
  97. teradataml/plot/axis.py +47 -8
  98. teradataml/plot/figure.py +33 -0
  99. teradataml/plot/plot.py +63 -13
  100. teradataml/scriptmgmt/UserEnv.py +5 -5
  101. teradataml/scriptmgmt/lls_utils.py +130 -40
  102. teradataml/store/__init__.py +12 -0
  103. teradataml/store/feature_store/__init__.py +0 -0
  104. teradataml/store/feature_store/constants.py +291 -0
  105. teradataml/store/feature_store/feature_store.py +2318 -0
  106. teradataml/store/feature_store/models.py +1505 -0
  107. teradataml/table_operators/Apply.py +32 -18
  108. teradataml/table_operators/Script.py +3 -1
  109. teradataml/table_operators/TableOperator.py +3 -1
  110. teradataml/table_operators/query_generator.py +3 -0
  111. teradataml/table_operators/table_operator_query_generator.py +3 -1
  112. teradataml/table_operators/table_operator_util.py +37 -38
  113. teradataml/table_operators/templates/dataframe_register.template +69 -0
  114. teradataml/utils/dtypes.py +51 -2
  115. teradataml/utils/internal_buffer.py +18 -0
  116. teradataml/utils/validators.py +99 -8
  117. {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/METADATA +321 -5
  118. {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/RECORD +121 -94
  119. teradataml/libaed_0_1.dylib +0 -0
  120. teradataml/libaed_0_1.so +0 -0
  121. teradataml/opensource/sklearn/__init__.py +0 -1
  122. teradataml/opensource/sklearn/_class.py +0 -255
  123. teradataml/opensource/sklearn/_sklearn_wrapper.py +0 -1800
  124. {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/WHEEL +0 -0
  125. {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/top_level.txt +0 -0
  126. {teradataml-20.0.0.2.dist-info → teradataml-20.0.0.4.dist-info}/zip-safe +0 -0
@@ -1368,5 +1368,13 @@
1368
1368
  "id": "INTEGER",
1369
1369
  "urls": "VARCHAR(60)",
1370
1370
  "part": "VARCHAR(20)"
1371
+ },
1372
+ "hnsw_data": {
1373
+ "id": "INTEGER",
1374
+ "array_col": "Vector"
1375
+ },
1376
+ "hnsw_alter_data": {
1377
+ "id": "INTEGER",
1378
+ "array_col": "Vector"
1371
1379
  }
1372
1380
  }
@@ -22,5 +22,9 @@
22
22
  "CallDuration": "REAL",
23
23
  "DataCounter": "REAL",
24
24
  "SMS": "REAL"
25
+ },
26
+ "target_udt_data":{
27
+ "id": "INTEGER",
28
+ "array_col":"Vector"
25
29
  }
26
30
  }
@@ -487,6 +487,11 @@ def copy_to_sql(df, table_name,
487
487
  table_type=TeradataConstants.TERADATA_TABLE,
488
488
  quote=False)
489
489
 
490
+ # If configure.temp_object_type="VT", _generate_temp_table_name() retruns the
491
+ # table name in fully qualified format. Because of this , test cases started
492
+ # failing with Blank name in quotation mark. Hence, extracted only the table name.
493
+ table_name = UtilFuncs._extract_table_name(table_name)
494
+
490
495
  # Let's create the SQLAlchemy table object to recreate the table
491
496
  if not table_exists or if_exists.lower() == 'replace':
492
497
  if not is_pti:
@@ -1459,9 +1464,9 @@ def _extract_column_info(df, types = None, index = False, index_label = None):
1459
1464
  # If the datatype is not specified then check if the datatype is datetime64 and timezone is present then map it to
1460
1465
  # TIMESTAMP(timezone=True) else map it according to default value.
1461
1466
  col_types = [types.get(col_name) if types and col_name in types else
1462
- TIMESTAMP(timezone=True) if pt.is_datetime64_ns_dtype(df.dtypes[key])
1467
+ TIMESTAMP(timezone=True) if pt.is_datetime64_ns_dtype(df.dtypes.iloc[key])
1463
1468
  and (df[col_name].dt.tz is not None)
1464
- else _get_sqlalchemy_mapping_types(str(df.dtypes[key]))
1469
+ else _get_sqlalchemy_mapping_types(str(df.dtypes.iloc[key]))
1465
1470
  for key, col_name in enumerate(list(df.columns))]
1466
1471
 
1467
1472
  ind_names = []
@@ -1469,7 +1474,7 @@ def _extract_column_info(df, types = None, index = False, index_label = None):
1469
1474
  if index:
1470
1475
  ind_names, ind_types = _get_index_labels(df, index_label)
1471
1476
  ind_types = [types.get(ind_name) if types and ind_name in types
1472
- else TIMESTAMP(timezone=True) if pt.is_datetime64_ns_dtype(df.dtypes[key])
1477
+ else TIMESTAMP(timezone=True) if pt.is_datetime64_ns_dtype(df.dtypes.iloc[key])
1473
1478
  and (df[ind_name].dt.tz is not None)
1474
1479
  else _get_sqlalchemy_mapping_types(str(ind_types[key]))
1475
1480
  for key, ind_name in enumerate(ind_names)]
@@ -328,6 +328,7 @@ def fastexport(df, export_to="pandas", index_column=None,
328
328
  # using fastexport datatransfer protocol.
329
329
  # "require" is always True, because with this function user requires
330
330
  # fastexport.
331
+
331
332
  return dt_obj._fastexport_get_pandas_df(require=True, **kwargs)
332
333
 
333
334
  # Convert teradataml DataFrame to CSV file.
@@ -2553,7 +2554,6 @@ class _DataTransferUtils():
2553
2554
  _create_staging_table_and_load_csv_data(column_info={"id": INTEGER}, primary_index = ['id'])
2554
2555
 
2555
2556
  """
2556
- stag_table_name = ""
2557
2557
  stage_table_created = False
2558
2558
  try:
2559
2559
  # Generate the temporary table.
@@ -2562,6 +2562,11 @@ class _DataTransferUtils():
2562
2562
  quote=False,
2563
2563
  table_type=TeradataConstants.TERADATA_TABLE)
2564
2564
 
2565
+ # If configure.temp_object_type="VT", _generate_temp_table_name() retruns the
2566
+ # table name in fully qualified format. Because of this , test cases started
2567
+ # failing with Blank name in quotation mark. Hence, extracted only the table name.
2568
+ stag_table_name = UtilFuncs._extract_table_name(stag_table_name)
2569
+
2565
2570
  # Information about uniqueness of primary index and
2566
2571
  # SET/MULTISET property of existing table is not available,
2567
2572
  # so over-assuming to be False.
@@ -2707,6 +2712,11 @@ class _DataTransferUtils():
2707
2712
  quote=False,
2708
2713
  table_type=TeradataConstants.TERADATA_TABLE)
2709
2714
 
2715
+ # If configure.temp_object_type="VT", _generate_temp_table_name() retruns the
2716
+ # table name in fully qualified format. Because of this , test cases started
2717
+ # failing with Blank name in quotation mark. Hence, extracted only the table name.
2718
+ stag_table_name = UtilFuncs._extract_table_name(stag_table_name)
2719
+
2710
2720
  # Get the teradataml dataframe from staging table using read_csv()
2711
2721
  read_csv_output = read_csv(filepath=self.df, table_name=stag_table_name,
2712
2722
  types=self.types, sep=self.sep,