teradataml 17.20.0.6__py3-none-any.whl → 20.0.0.0__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/LICENSE.pdf +0 -0
- teradataml/README.md +238 -1
- teradataml/__init__.py +13 -3
- teradataml/_version.py +1 -1
- teradataml/analytics/Transformations.py +4 -4
- teradataml/analytics/__init__.py +0 -2
- teradataml/analytics/analytic_function_executor.py +3 -0
- teradataml/analytics/json_parser/utils.py +13 -12
- teradataml/analytics/sqle/DecisionTreePredict.py +15 -30
- teradataml/analytics/sqle/NaiveBayesPredict.py +11 -20
- teradataml/analytics/sqle/__init__.py +0 -13
- teradataml/analytics/utils.py +1 -0
- teradataml/analytics/valib.py +3 -0
- teradataml/automl/__init__.py +1628 -0
- teradataml/automl/custom_json_utils.py +1270 -0
- teradataml/automl/data_preparation.py +993 -0
- teradataml/automl/data_transformation.py +727 -0
- teradataml/automl/feature_engineering.py +1648 -0
- teradataml/automl/feature_exploration.py +547 -0
- teradataml/automl/model_evaluation.py +163 -0
- teradataml/automl/model_training.py +887 -0
- teradataml/catalog/__init__.py +0 -2
- teradataml/catalog/byom.py +49 -6
- teradataml/catalog/function_argument_mapper.py +0 -2
- teradataml/catalog/model_cataloging_utils.py +2 -1021
- teradataml/common/aed_utils.py +6 -2
- teradataml/common/constants.py +50 -58
- teradataml/common/deprecations.py +160 -0
- teradataml/common/garbagecollector.py +61 -104
- teradataml/common/messagecodes.py +27 -36
- teradataml/common/messages.py +11 -15
- teradataml/common/utils.py +205 -287
- teradataml/common/wrapper_utils.py +1 -110
- teradataml/context/context.py +150 -78
- teradataml/data/bank_churn.csv +10001 -0
- teradataml/data/bmi.csv +501 -0
- teradataml/data/docs/sqle/docs_17_10/BincodeFit.py +3 -3
- teradataml/data/docs/sqle/docs_17_10/BincodeTransform.py +6 -5
- teradataml/data/docs/sqle/docs_17_10/Fit.py +1 -1
- teradataml/data/docs/sqle/docs_17_10/OneHotEncodingTransform.py +1 -1
- teradataml/data/docs/sqle/docs_17_10/OutlierFilterTransform.py +1 -1
- teradataml/data/docs/sqle/docs_17_10/PolynomialFeaturesTransform.py +2 -2
- teradataml/data/docs/sqle/docs_17_10/RowNormalizeTransform.py +2 -1
- teradataml/data/docs/sqle/docs_17_10/ScaleTransform.py +1 -0
- teradataml/data/docs/sqle/docs_17_10/SimpleImputeTransform.py +1 -1
- teradataml/data/docs/sqle/docs_17_10/Transform.py +2 -1
- teradataml/data/docs/sqle/docs_17_20/BincodeFit.py +3 -3
- teradataml/data/docs/sqle/docs_17_20/BincodeTransform.py +6 -5
- teradataml/data/docs/sqle/docs_17_20/Fit.py +1 -1
- teradataml/data/docs/sqle/docs_17_20/GLM.py +1 -1
- teradataml/data/docs/sqle/docs_17_20/GLMPredictPerSegment.py +9 -10
- teradataml/data/docs/sqle/docs_17_20/KMeansPredict.py +3 -2
- teradataml/data/docs/sqle/docs_17_20/NaiveBayesTextClassifierPredict.py +16 -15
- teradataml/data/docs/sqle/docs_17_20/NaiveBayesTextClassifierTrainer.py +2 -2
- teradataml/data/docs/sqle/docs_17_20/NonLinearCombineFit.py +2 -2
- teradataml/data/docs/sqle/docs_17_20/NonLinearCombineTransform.py +8 -8
- teradataml/data/docs/sqle/docs_17_20/OneClassSVMPredict.py +21 -20
- teradataml/data/docs/sqle/docs_17_20/OneHotEncodingTransform.py +1 -1
- teradataml/data/docs/sqle/docs_17_20/OutlierFilterTransform.py +8 -3
- teradataml/data/docs/sqle/docs_17_20/PolynomialFeaturesTransform.py +6 -5
- teradataml/data/docs/sqle/docs_17_20/RandomProjectionTransform.py +6 -6
- teradataml/data/docs/sqle/docs_17_20/RowNormalizeTransform.py +2 -1
- teradataml/data/docs/sqle/docs_17_20/SVM.py +1 -1
- teradataml/data/docs/sqle/docs_17_20/SVMPredict.py +16 -16
- teradataml/data/docs/sqle/docs_17_20/ScaleTransform.py +1 -0
- teradataml/data/docs/sqle/docs_17_20/SimpleImputeTransform.py +3 -2
- teradataml/data/docs/sqle/docs_17_20/TDDecisionForestPredict.py +4 -4
- teradataml/data/docs/sqle/docs_17_20/TDGLMPredict.py +19 -19
- teradataml/data/docs/sqle/docs_17_20/TargetEncodingTransform.py +5 -4
- teradataml/data/docs/sqle/docs_17_20/Transform.py +2 -2
- teradataml/data/docs/sqle/docs_17_20/XGBoostPredict.py +9 -9
- teradataml/data/fish.csv +160 -0
- teradataml/data/glass_types.csv +215 -0
- teradataml/data/insurance.csv +1 -1
- teradataml/data/iris_data.csv +151 -0
- teradataml/data/jsons/sqle/17.10/TD_FunctionTransform.json +1 -0
- teradataml/data/jsons/sqle/17.10/TD_OneHotEncodingTransform.json +1 -0
- teradataml/data/jsons/sqle/17.10/TD_OutlierFilterTransform.json +1 -0
- teradataml/data/jsons/sqle/17.10/TD_PolynomialFeaturesTransform.json +1 -0
- teradataml/data/jsons/sqle/17.10/TD_RowNormalizeTransform.json +1 -0
- teradataml/data/jsons/sqle/17.10/TD_ScaleTransform.json +1 -0
- teradataml/data/jsons/sqle/17.10/TD_SimpleImputeTransform.json +1 -0
- teradataml/data/load_example_data.py +3 -0
- teradataml/data/multi_model_classification.csv +401 -0
- teradataml/data/multi_model_regression.csv +401 -0
- teradataml/data/openml_example.json +63 -0
- teradataml/data/scripts/deploy_script.py +65 -0
- teradataml/data/scripts/mapper.R +20 -0
- teradataml/data/scripts/sklearn/__init__.py +0 -0
- teradataml/data/scripts/sklearn/sklearn_fit.py +175 -0
- teradataml/data/scripts/sklearn/sklearn_fit_predict.py +135 -0
- teradataml/data/scripts/sklearn/sklearn_function.template +113 -0
- teradataml/data/scripts/sklearn/sklearn_model_selection_split.py +158 -0
- teradataml/data/scripts/sklearn/sklearn_neighbors.py +152 -0
- teradataml/data/scripts/sklearn/sklearn_score.py +128 -0
- teradataml/data/scripts/sklearn/sklearn_transform.py +179 -0
- teradataml/data/templates/open_source_ml.json +9 -0
- teradataml/data/teradataml_example.json +73 -1
- teradataml/data/test_classification.csv +101 -0
- teradataml/data/test_prediction.csv +101 -0
- teradataml/data/test_regression.csv +101 -0
- teradataml/data/train_multiclass.csv +101 -0
- teradataml/data/train_regression.csv +101 -0
- teradataml/data/train_regression_multiple_labels.csv +101 -0
- teradataml/data/wine_data.csv +1600 -0
- teradataml/dataframe/copy_to.py +79 -13
- teradataml/dataframe/data_transfer.py +8 -0
- teradataml/dataframe/dataframe.py +910 -311
- teradataml/dataframe/dataframe_utils.py +102 -5
- teradataml/dataframe/fastload.py +11 -3
- teradataml/dataframe/setop.py +15 -2
- teradataml/dataframe/sql.py +3735 -77
- teradataml/dataframe/sql_function_parameters.py +56 -5
- teradataml/dataframe/vantage_function_types.py +45 -1
- teradataml/dataframe/window.py +30 -29
- teradataml/dbutils/dbutils.py +18 -1
- teradataml/geospatial/geodataframe.py +18 -7
- teradataml/geospatial/geodataframecolumn.py +5 -0
- teradataml/hyperparameter_tuner/optimizer.py +910 -120
- teradataml/hyperparameter_tuner/utils.py +131 -37
- 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/libaed_0_1.dylib +0 -0
- teradataml/libaed_0_1.so +0 -0
- teradataml/opensource/__init__.py +1 -0
- teradataml/opensource/sklearn/__init__.py +1 -0
- teradataml/opensource/sklearn/_class.py +255 -0
- teradataml/opensource/sklearn/_sklearn_wrapper.py +1668 -0
- teradataml/opensource/sklearn/_wrapper_utils.py +268 -0
- teradataml/opensource/sklearn/constants.py +54 -0
- teradataml/options/__init__.py +3 -6
- teradataml/options/configure.py +21 -20
- teradataml/scriptmgmt/UserEnv.py +61 -5
- teradataml/scriptmgmt/lls_utils.py +135 -53
- teradataml/table_operators/Apply.py +38 -6
- teradataml/table_operators/Script.py +45 -308
- teradataml/table_operators/TableOperator.py +182 -591
- teradataml/table_operators/__init__.py +0 -1
- teradataml/table_operators/table_operator_util.py +32 -40
- teradataml/utils/validators.py +127 -3
- {teradataml-17.20.0.6.dist-info → teradataml-20.0.0.0.dist-info}/METADATA +243 -3
- {teradataml-17.20.0.6.dist-info → teradataml-20.0.0.0.dist-info}/RECORD +147 -391
- teradataml/analytics/mle/AdaBoost.py +0 -651
- teradataml/analytics/mle/AdaBoostPredict.py +0 -564
- teradataml/analytics/mle/Antiselect.py +0 -342
- teradataml/analytics/mle/Arima.py +0 -641
- teradataml/analytics/mle/ArimaPredict.py +0 -477
- teradataml/analytics/mle/Attribution.py +0 -1070
- teradataml/analytics/mle/Betweenness.py +0 -658
- teradataml/analytics/mle/Burst.py +0 -711
- teradataml/analytics/mle/CCM.py +0 -600
- teradataml/analytics/mle/CCMPrepare.py +0 -324
- teradataml/analytics/mle/CFilter.py +0 -460
- teradataml/analytics/mle/ChangePointDetection.py +0 -572
- teradataml/analytics/mle/ChangePointDetectionRT.py +0 -477
- teradataml/analytics/mle/Closeness.py +0 -737
- teradataml/analytics/mle/ConfusionMatrix.py +0 -420
- teradataml/analytics/mle/Correlation.py +0 -477
- teradataml/analytics/mle/Correlation2.py +0 -573
- teradataml/analytics/mle/CoxHazardRatio.py +0 -679
- teradataml/analytics/mle/CoxPH.py +0 -556
- teradataml/analytics/mle/CoxSurvival.py +0 -478
- teradataml/analytics/mle/CumulativeMovAvg.py +0 -363
- teradataml/analytics/mle/DTW.py +0 -623
- teradataml/analytics/mle/DWT.py +0 -564
- teradataml/analytics/mle/DWT2D.py +0 -599
- teradataml/analytics/mle/DecisionForest.py +0 -716
- teradataml/analytics/mle/DecisionForestEvaluator.py +0 -363
- teradataml/analytics/mle/DecisionForestPredict.py +0 -561
- teradataml/analytics/mle/DecisionTree.py +0 -830
- teradataml/analytics/mle/DecisionTreePredict.py +0 -528
- teradataml/analytics/mle/ExponentialMovAvg.py +0 -418
- teradataml/analytics/mle/FMeasure.py +0 -402
- teradataml/analytics/mle/FPGrowth.py +0 -734
- teradataml/analytics/mle/FrequentPaths.py +0 -695
- teradataml/analytics/mle/GLM.py +0 -558
- teradataml/analytics/mle/GLML1L2.py +0 -547
- teradataml/analytics/mle/GLML1L2Predict.py +0 -519
- teradataml/analytics/mle/GLMPredict.py +0 -529
- teradataml/analytics/mle/HMMDecoder.py +0 -945
- teradataml/analytics/mle/HMMEvaluator.py +0 -901
- teradataml/analytics/mle/HMMSupervised.py +0 -521
- teradataml/analytics/mle/HMMUnsupervised.py +0 -572
- teradataml/analytics/mle/Histogram.py +0 -561
- teradataml/analytics/mle/IDWT.py +0 -476
- teradataml/analytics/mle/IDWT2D.py +0 -493
- teradataml/analytics/mle/IdentityMatch.py +0 -763
- teradataml/analytics/mle/Interpolator.py +0 -918
- teradataml/analytics/mle/KMeans.py +0 -485
- teradataml/analytics/mle/KNN.py +0 -627
- teradataml/analytics/mle/KNNRecommender.py +0 -488
- teradataml/analytics/mle/KNNRecommenderPredict.py +0 -581
- teradataml/analytics/mle/LAR.py +0 -439
- teradataml/analytics/mle/LARPredict.py +0 -478
- teradataml/analytics/mle/LDA.py +0 -548
- teradataml/analytics/mle/LDAInference.py +0 -492
- teradataml/analytics/mle/LDATopicSummary.py +0 -464
- teradataml/analytics/mle/LevenshteinDistance.py +0 -450
- teradataml/analytics/mle/LinReg.py +0 -433
- teradataml/analytics/mle/LinRegPredict.py +0 -438
- teradataml/analytics/mle/MinHash.py +0 -544
- teradataml/analytics/mle/Modularity.py +0 -587
- teradataml/analytics/mle/NEREvaluator.py +0 -410
- teradataml/analytics/mle/NERExtractor.py +0 -595
- teradataml/analytics/mle/NERTrainer.py +0 -458
- teradataml/analytics/mle/NGrams.py +0 -570
- teradataml/analytics/mle/NPath.py +0 -634
- teradataml/analytics/mle/NTree.py +0 -549
- teradataml/analytics/mle/NaiveBayes.py +0 -462
- teradataml/analytics/mle/NaiveBayesPredict.py +0 -513
- teradataml/analytics/mle/NaiveBayesTextClassifier.py +0 -607
- teradataml/analytics/mle/NaiveBayesTextClassifier2.py +0 -531
- teradataml/analytics/mle/NaiveBayesTextClassifierPredict.py +0 -799
- teradataml/analytics/mle/NamedEntityFinder.py +0 -529
- teradataml/analytics/mle/NamedEntityFinderEvaluator.py +0 -414
- teradataml/analytics/mle/NamedEntityFinderTrainer.py +0 -396
- teradataml/analytics/mle/POSTagger.py +0 -417
- teradataml/analytics/mle/Pack.py +0 -411
- teradataml/analytics/mle/PageRank.py +0 -535
- teradataml/analytics/mle/PathAnalyzer.py +0 -426
- teradataml/analytics/mle/PathGenerator.py +0 -367
- teradataml/analytics/mle/PathStart.py +0 -464
- teradataml/analytics/mle/PathSummarizer.py +0 -470
- teradataml/analytics/mle/Pivot.py +0 -471
- teradataml/analytics/mle/ROC.py +0 -425
- teradataml/analytics/mle/RandomSample.py +0 -637
- teradataml/analytics/mle/RandomWalkSample.py +0 -490
- teradataml/analytics/mle/SAX.py +0 -779
- teradataml/analytics/mle/SVMDense.py +0 -677
- teradataml/analytics/mle/SVMDensePredict.py +0 -536
- teradataml/analytics/mle/SVMDenseSummary.py +0 -437
- teradataml/analytics/mle/SVMSparse.py +0 -557
- teradataml/analytics/mle/SVMSparsePredict.py +0 -553
- teradataml/analytics/mle/SVMSparseSummary.py +0 -435
- teradataml/analytics/mle/Sampling.py +0 -549
- teradataml/analytics/mle/Scale.py +0 -565
- teradataml/analytics/mle/ScaleByPartition.py +0 -496
- teradataml/analytics/mle/ScaleMap.py +0 -378
- teradataml/analytics/mle/ScaleSummary.py +0 -320
- teradataml/analytics/mle/SentenceExtractor.py +0 -363
- teradataml/analytics/mle/SentimentEvaluator.py +0 -432
- teradataml/analytics/mle/SentimentExtractor.py +0 -578
- teradataml/analytics/mle/SentimentTrainer.py +0 -405
- teradataml/analytics/mle/SeriesSplitter.py +0 -641
- teradataml/analytics/mle/Sessionize.py +0 -475
- teradataml/analytics/mle/SimpleMovAvg.py +0 -397
- teradataml/analytics/mle/StringSimilarity.py +0 -425
- teradataml/analytics/mle/TF.py +0 -389
- teradataml/analytics/mle/TFIDF.py +0 -504
- teradataml/analytics/mle/TextChunker.py +0 -414
- teradataml/analytics/mle/TextClassifier.py +0 -399
- teradataml/analytics/mle/TextClassifierEvaluator.py +0 -413
- teradataml/analytics/mle/TextClassifierTrainer.py +0 -565
- teradataml/analytics/mle/TextMorph.py +0 -494
- teradataml/analytics/mle/TextParser.py +0 -623
- teradataml/analytics/mle/TextTagger.py +0 -530
- teradataml/analytics/mle/TextTokenizer.py +0 -502
- teradataml/analytics/mle/UnivariateStatistics.py +0 -488
- teradataml/analytics/mle/Unpack.py +0 -526
- teradataml/analytics/mle/Unpivot.py +0 -438
- teradataml/analytics/mle/VarMax.py +0 -776
- teradataml/analytics/mle/VectorDistance.py +0 -762
- teradataml/analytics/mle/WeightedMovAvg.py +0 -400
- teradataml/analytics/mle/XGBoost.py +0 -842
- teradataml/analytics/mle/XGBoostPredict.py +0 -627
- teradataml/analytics/mle/__init__.py +0 -123
- teradataml/analytics/mle/json/adaboost_mle.json +0 -135
- teradataml/analytics/mle/json/adaboostpredict_mle.json +0 -85
- teradataml/analytics/mle/json/antiselect_mle.json +0 -34
- teradataml/analytics/mle/json/antiselect_mle_mle.json +0 -34
- teradataml/analytics/mle/json/arima_mle.json +0 -172
- teradataml/analytics/mle/json/arimapredict_mle.json +0 -52
- teradataml/analytics/mle/json/attribution_mle_mle.json +0 -143
- teradataml/analytics/mle/json/betweenness_mle.json +0 -97
- teradataml/analytics/mle/json/burst_mle.json +0 -140
- teradataml/analytics/mle/json/ccm_mle.json +0 -124
- teradataml/analytics/mle/json/ccmprepare_mle.json +0 -14
- teradataml/analytics/mle/json/cfilter_mle.json +0 -93
- teradataml/analytics/mle/json/changepointdetection_mle.json +0 -92
- teradataml/analytics/mle/json/changepointdetectionrt_mle.json +0 -78
- teradataml/analytics/mle/json/closeness_mle.json +0 -104
- teradataml/analytics/mle/json/confusionmatrix_mle.json +0 -79
- teradataml/analytics/mle/json/correlation_mle.json +0 -86
- teradataml/analytics/mle/json/correlationreduce_mle.json +0 -49
- teradataml/analytics/mle/json/coxhazardratio_mle.json +0 -89
- teradataml/analytics/mle/json/coxph_mle.json +0 -98
- teradataml/analytics/mle/json/coxsurvival_mle.json +0 -79
- teradataml/analytics/mle/json/cumulativemovavg_mle.json +0 -34
- teradataml/analytics/mle/json/decisionforest_mle.json +0 -167
- teradataml/analytics/mle/json/decisionforestevaluator_mle.json +0 -33
- teradataml/analytics/mle/json/decisionforestpredict_mle_mle.json +0 -74
- teradataml/analytics/mle/json/decisiontree_mle.json +0 -194
- teradataml/analytics/mle/json/decisiontreepredict_mle_mle.json +0 -86
- teradataml/analytics/mle/json/dtw_mle.json +0 -97
- teradataml/analytics/mle/json/dwt2d_mle.json +0 -116
- teradataml/analytics/mle/json/dwt_mle.json +0 -101
- teradataml/analytics/mle/json/exponentialmovavg_mle.json +0 -55
- teradataml/analytics/mle/json/fmeasure_mle.json +0 -58
- teradataml/analytics/mle/json/fpgrowth_mle.json +0 -159
- teradataml/analytics/mle/json/frequentpaths_mle.json +0 -129
- teradataml/analytics/mle/json/glm_mle.json +0 -111
- teradataml/analytics/mle/json/glml1l2_mle.json +0 -106
- teradataml/analytics/mle/json/glml1l2predict_mle.json +0 -57
- teradataml/analytics/mle/json/glmpredict_mle_mle.json +0 -74
- teradataml/analytics/mle/json/histogram_mle.json +0 -100
- teradataml/analytics/mle/json/hmmdecoder_mle.json +0 -192
- teradataml/analytics/mle/json/hmmevaluator_mle.json +0 -206
- teradataml/analytics/mle/json/hmmsupervised_mle.json +0 -91
- teradataml/analytics/mle/json/hmmunsupervised_mle.json +0 -114
- teradataml/analytics/mle/json/identitymatch_mle.json +0 -88
- teradataml/analytics/mle/json/idwt2d_mle.json +0 -73
- teradataml/analytics/mle/json/idwt_mle.json +0 -66
- teradataml/analytics/mle/json/interpolator_mle.json +0 -151
- teradataml/analytics/mle/json/kmeans_mle.json +0 -97
- teradataml/analytics/mle/json/knn_mle.json +0 -141
- teradataml/analytics/mle/json/knnrecommender_mle.json +0 -111
- teradataml/analytics/mle/json/knnrecommenderpredict_mle.json +0 -75
- teradataml/analytics/mle/json/lar_mle.json +0 -78
- teradataml/analytics/mle/json/larpredict_mle.json +0 -69
- teradataml/analytics/mle/json/lda_mle.json +0 -130
- teradataml/analytics/mle/json/ldainference_mle.json +0 -78
- teradataml/analytics/mle/json/ldatopicsummary_mle.json +0 -64
- teradataml/analytics/mle/json/levenshteindistance_mle.json +0 -92
- teradataml/analytics/mle/json/linreg_mle.json +0 -42
- teradataml/analytics/mle/json/linregpredict_mle.json +0 -56
- teradataml/analytics/mle/json/minhash_mle.json +0 -113
- teradataml/analytics/mle/json/modularity_mle.json +0 -91
- teradataml/analytics/mle/json/naivebayespredict_mle_mle.json +0 -85
- teradataml/analytics/mle/json/naivebayesreduce_mle.json +0 -52
- teradataml/analytics/mle/json/naivebayestextclassifierpredict_mle_mle.json +0 -147
- teradataml/analytics/mle/json/naivebayestextclassifiertrainer2_mle.json +0 -108
- teradataml/analytics/mle/json/naivebayestextclassifiertrainer_mle.json +0 -102
- teradataml/analytics/mle/json/namedentityfinder_mle.json +0 -84
- teradataml/analytics/mle/json/namedentityfinderevaluatorreduce_mle.json +0 -43
- teradataml/analytics/mle/json/namedentityfindertrainer_mle.json +0 -64
- teradataml/analytics/mle/json/nerevaluator_mle.json +0 -54
- teradataml/analytics/mle/json/nerextractor_mle.json +0 -87
- teradataml/analytics/mle/json/nertrainer_mle.json +0 -89
- teradataml/analytics/mle/json/ngrams_mle.json +0 -137
- teradataml/analytics/mle/json/ngramsplitter_mle_mle.json +0 -137
- teradataml/analytics/mle/json/npath@coprocessor_mle.json +0 -73
- teradataml/analytics/mle/json/ntree@coprocessor_mle.json +0 -123
- teradataml/analytics/mle/json/pack_mle.json +0 -58
- teradataml/analytics/mle/json/pack_mle_mle.json +0 -58
- teradataml/analytics/mle/json/pagerank_mle.json +0 -81
- teradataml/analytics/mle/json/pathanalyzer_mle.json +0 -63
- teradataml/analytics/mle/json/pathgenerator_mle.json +0 -40
- teradataml/analytics/mle/json/pathstart_mle.json +0 -62
- teradataml/analytics/mle/json/pathsummarizer_mle.json +0 -72
- teradataml/analytics/mle/json/pivoting_mle.json +0 -71
- teradataml/analytics/mle/json/postagger_mle.json +0 -51
- teradataml/analytics/mle/json/randomsample_mle.json +0 -131
- teradataml/analytics/mle/json/randomwalksample_mle.json +0 -85
- teradataml/analytics/mle/json/roc_mle.json +0 -73
- teradataml/analytics/mle/json/sampling_mle.json +0 -75
- teradataml/analytics/mle/json/sax_mle.json +0 -154
- teradataml/analytics/mle/json/scale_mle.json +0 -93
- teradataml/analytics/mle/json/scalebypartition_mle.json +0 -89
- teradataml/analytics/mle/json/scalemap_mle.json +0 -44
- teradataml/analytics/mle/json/scalesummary_mle.json +0 -14
- teradataml/analytics/mle/json/sentenceextractor_mle.json +0 -41
- teradataml/analytics/mle/json/sentimentevaluator_mle.json +0 -43
- teradataml/analytics/mle/json/sentimentextractor_mle.json +0 -100
- teradataml/analytics/mle/json/sentimenttrainer_mle.json +0 -68
- teradataml/analytics/mle/json/seriessplitter_mle.json +0 -133
- teradataml/analytics/mle/json/sessionize_mle_mle.json +0 -62
- teradataml/analytics/mle/json/simplemovavg_mle.json +0 -48
- teradataml/analytics/mle/json/stringsimilarity_mle.json +0 -50
- teradataml/analytics/mle/json/stringsimilarity_mle_mle.json +0 -50
- teradataml/analytics/mle/json/svmdense_mle.json +0 -165
- teradataml/analytics/mle/json/svmdensepredict_mle.json +0 -95
- teradataml/analytics/mle/json/svmdensesummary_mle.json +0 -58
- teradataml/analytics/mle/json/svmsparse_mle.json +0 -148
- teradataml/analytics/mle/json/svmsparsepredict_mle_mle.json +0 -103
- teradataml/analytics/mle/json/svmsparsesummary_mle.json +0 -57
- teradataml/analytics/mle/json/textchunker_mle.json +0 -40
- teradataml/analytics/mle/json/textclassifier_mle.json +0 -51
- teradataml/analytics/mle/json/textclassifierevaluator_mle.json +0 -43
- teradataml/analytics/mle/json/textclassifiertrainer_mle.json +0 -103
- teradataml/analytics/mle/json/textmorph_mle.json +0 -63
- teradataml/analytics/mle/json/textparser_mle.json +0 -166
- teradataml/analytics/mle/json/texttagger_mle.json +0 -81
- teradataml/analytics/mle/json/texttokenizer_mle.json +0 -91
- teradataml/analytics/mle/json/tf_mle.json +0 -33
- teradataml/analytics/mle/json/tfidf_mle.json +0 -34
- teradataml/analytics/mle/json/univariatestatistics_mle.json +0 -81
- teradataml/analytics/mle/json/unpack_mle.json +0 -91
- teradataml/analytics/mle/json/unpack_mle_mle.json +0 -91
- teradataml/analytics/mle/json/unpivoting_mle.json +0 -63
- teradataml/analytics/mle/json/varmax_mle.json +0 -176
- teradataml/analytics/mle/json/vectordistance_mle.json +0 -179
- teradataml/analytics/mle/json/weightedmovavg_mle.json +0 -48
- teradataml/analytics/mle/json/xgboost_mle.json +0 -178
- teradataml/analytics/mle/json/xgboostpredict_mle.json +0 -104
- teradataml/analytics/sqle/Antiselect.py +0 -321
- teradataml/analytics/sqle/Attribution.py +0 -603
- teradataml/analytics/sqle/DecisionForestPredict.py +0 -408
- teradataml/analytics/sqle/GLMPredict.py +0 -430
- teradataml/analytics/sqle/MovingAverage.py +0 -543
- teradataml/analytics/sqle/NGramSplitter.py +0 -548
- teradataml/analytics/sqle/NPath.py +0 -632
- teradataml/analytics/sqle/NaiveBayesTextClassifierPredict.py +0 -515
- teradataml/analytics/sqle/Pack.py +0 -388
- teradataml/analytics/sqle/SVMSparsePredict.py +0 -464
- teradataml/analytics/sqle/Sessionize.py +0 -390
- teradataml/analytics/sqle/StringSimilarity.py +0 -400
- teradataml/analytics/sqle/Unpack.py +0 -503
- teradataml/analytics/sqle/json/antiselect_sqle.json +0 -21
- teradataml/analytics/sqle/json/attribution_sqle.json +0 -92
- teradataml/analytics/sqle/json/decisionforestpredict_sqle.json +0 -48
- teradataml/analytics/sqle/json/glmpredict_sqle.json +0 -48
- teradataml/analytics/sqle/json/h2opredict_sqle.json +0 -63
- teradataml/analytics/sqle/json/movingaverage_sqle.json +0 -58
- teradataml/analytics/sqle/json/naivebayestextclassifierpredict_sqle.json +0 -76
- teradataml/analytics/sqle/json/ngramsplitter_sqle.json +0 -126
- teradataml/analytics/sqle/json/npath_sqle.json +0 -67
- teradataml/analytics/sqle/json/pack_sqle.json +0 -47
- teradataml/analytics/sqle/json/pmmlpredict_sqle.json +0 -55
- teradataml/analytics/sqle/json/sessionize_sqle.json +0 -43
- teradataml/analytics/sqle/json/stringsimilarity_sqle.json +0 -39
- teradataml/analytics/sqle/json/svmsparsepredict_sqle.json +0 -74
- teradataml/analytics/sqle/json/unpack_sqle.json +0 -80
- teradataml/catalog/model_cataloging.py +0 -980
- teradataml/config/mlengine_alias_definitions_v1.0 +0 -118
- teradataml/config/mlengine_alias_definitions_v1.1 +0 -127
- teradataml/config/mlengine_alias_definitions_v1.3 +0 -129
- teradataml/table_operators/sandbox_container_util.py +0 -643
- {teradataml-17.20.0.6.dist-info → teradataml-20.0.0.0.dist-info}/WHEEL +0 -0
- {teradataml-17.20.0.6.dist-info → teradataml-20.0.0.0.dist-info}/top_level.txt +0 -0
- {teradataml-17.20.0.6.dist-info → teradataml-20.0.0.0.dist-info}/zip-safe +0 -0
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import os
|
|
14
14
|
import teradataml.dataframe as tdmldf
|
|
15
|
-
from teradataml.common.constants import TableOperatorConstants
|
|
15
|
+
from teradataml.common.constants import TableOperatorConstants, \
|
|
16
16
|
TeradataConstants, OutputStyle
|
|
17
17
|
from teradataml import configure
|
|
18
18
|
from teradataml.common.garbagecollector import GarbageCollector
|
|
@@ -107,10 +107,7 @@ class _TableOperatorUtils:
|
|
|
107
107
|
DataFrame in Vantage.
|
|
108
108
|
* LOCAL: Execute the function locally on sample data (at
|
|
109
109
|
most "num_rows" rows) from "data".
|
|
110
|
-
|
|
111
|
-
environment on sample data (at most "num_rows"
|
|
112
|
-
rows) from "data".
|
|
113
|
-
Permitted values: 'IN-DB', 'LOCAL', 'SANDBOX', 'REMOTE'
|
|
110
|
+
Permitted values: 'IN-DB', 'LOCAL', 'REMOTE'
|
|
114
111
|
Types: str
|
|
115
112
|
|
|
116
113
|
chunk_size:
|
|
@@ -183,7 +180,7 @@ class _TableOperatorUtils:
|
|
|
183
180
|
Required Argument.
|
|
184
181
|
Specifies the maximum number of sample rows to use from the
|
|
185
182
|
teradataml DataFrame to apply the user defined function to when
|
|
186
|
-
"exec_mode" is 'LOCAL'
|
|
183
|
+
"exec_mode" is 'LOCAL'.
|
|
187
184
|
Types: int
|
|
188
185
|
|
|
189
186
|
delimiter:
|
|
@@ -330,7 +327,7 @@ class _TableOperatorUtils:
|
|
|
330
327
|
# Generate script name and alias, and add entry to a Garbage Collector.
|
|
331
328
|
# script_entry is the string that is added to Garbage collector.
|
|
332
329
|
# It has the format "<databasename>"."<file_id>".
|
|
333
|
-
self.script_entry, self.script_alias, self.script_name = self.__get_script_name()
|
|
330
|
+
self.script_entry, self.script_alias, self.script_name, self.script_base_name = self.__get_script_name()
|
|
334
331
|
|
|
335
332
|
# Get the converters to use with pandas.read_csv, and to correctly
|
|
336
333
|
# typecast the numeric data.
|
|
@@ -390,7 +387,7 @@ class _TableOperatorUtils:
|
|
|
390
387
|
# needs to be deleted.
|
|
391
388
|
self.__remove_file_and_delete_entry_from_gc(remove_from_sql_eng=False)
|
|
392
389
|
raise
|
|
393
|
-
|
|
390
|
+
|
|
394
391
|
def execute(self):
|
|
395
392
|
"""
|
|
396
393
|
DESCRIPTION:
|
|
@@ -439,18 +436,23 @@ class _TableOperatorUtils:
|
|
|
439
436
|
None.
|
|
440
437
|
|
|
441
438
|
RETURNS:
|
|
442
|
-
A
|
|
439
|
+
A 4 -tuple of Strings (str).
|
|
443
440
|
|
|
444
441
|
EXAMPLES:
|
|
445
|
-
script_entry, script_alias, script_name = self.__get_script_name()
|
|
442
|
+
script_entry, script_alias, script_name, script_base_name = self.__get_script_name()
|
|
446
443
|
"""
|
|
447
|
-
script_entry = UtilFuncs._generate_temp_script_name(prefix="" if self.operation is None else self.operation
|
|
444
|
+
script_entry = UtilFuncs._generate_temp_script_name(prefix="" if self.operation is None else self.operation,
|
|
445
|
+
extension="py")
|
|
448
446
|
# script_alias is the file ID.
|
|
449
447
|
script_alias = UtilFuncs._teradata_unquote_arg(UtilFuncs._extract_table_name(script_entry), quote='"')
|
|
448
|
+
|
|
450
449
|
# script_name is the actual file name (basename).
|
|
451
|
-
script_name =
|
|
450
|
+
script_name = script_alias # alias now contains extension also.
|
|
452
451
|
|
|
453
|
-
|
|
452
|
+
# Extract the base name without extension.
|
|
453
|
+
from pathlib import Path
|
|
454
|
+
script_base_name = Path(script_alias).stem
|
|
455
|
+
return script_entry, script_alias, script_name, script_base_name
|
|
454
456
|
|
|
455
457
|
def __execute_script_table_operator(self):
|
|
456
458
|
"""
|
|
@@ -505,14 +507,12 @@ class _TableOperatorUtils:
|
|
|
505
507
|
)
|
|
506
508
|
table_op_obj.check_reserved_keyword = check_reserved_keyword
|
|
507
509
|
|
|
508
|
-
|
|
509
|
-
|
|
510
510
|
if self.exec_mode.upper() == TableOperatorConstants.INDB_EXEC.value:
|
|
511
511
|
# If not test mode, execute the script in Vantage.
|
|
512
512
|
try:
|
|
513
513
|
# Install that file, suppressing the output message.
|
|
514
514
|
execute_sql('SET SESSION SEARCHUIFDBPATH = \"{}\"'.format(database))
|
|
515
|
-
install_file(file_identifier=self.
|
|
515
|
+
install_file(file_identifier=self.script_base_name,
|
|
516
516
|
file_path=self.script_path,
|
|
517
517
|
suppress_output=True)
|
|
518
518
|
|
|
@@ -525,10 +525,6 @@ class _TableOperatorUtils:
|
|
|
525
525
|
self.__remove_file_and_delete_entry_from_gc()
|
|
526
526
|
elif self.exec_mode.upper() == TableOperatorConstants.LOCAL_EXEC.value:
|
|
527
527
|
return table_op_obj.test_script(exec_mode='local')
|
|
528
|
-
else:
|
|
529
|
-
# TODO: Add Support for Sandbox mode.
|
|
530
|
-
# JIRA: https://jira.td.teradata.com/jira/browse/ELE-3277
|
|
531
|
-
raise NotImplementedError()
|
|
532
528
|
|
|
533
529
|
def __execute_apply_table_operator(self):
|
|
534
530
|
"""
|
|
@@ -552,21 +548,21 @@ class _TableOperatorUtils:
|
|
|
552
548
|
# First create Apply Table operator object so that validations are done on inputs.
|
|
553
549
|
from teradataml.table_operators.Apply import Apply
|
|
554
550
|
apply_op_obj = Apply(data=self.data,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
551
|
+
script_name=self.script_name,
|
|
552
|
+
env_name=self.env_name,
|
|
553
|
+
files_local_path=GarbageCollector._get_temp_dir_name(),
|
|
554
|
+
apply_command="python3 {}".format(self.script_name),
|
|
555
|
+
returns=self.returns,
|
|
556
|
+
delimiter=self.delimiter,
|
|
557
|
+
quotechar=self.quotechar,
|
|
558
|
+
data_order_column=self.data_order_column,
|
|
559
|
+
is_local_order=self.is_local_order,
|
|
560
|
+
sort_ascending=self.sort_ascending,
|
|
561
|
+
nulls_first=self.nulls_first,
|
|
562
|
+
data_partition_column=self.data_partition_column,
|
|
563
|
+
data_hash_column=self.data_hash_column,
|
|
564
|
+
style=self.style
|
|
565
|
+
)
|
|
570
566
|
|
|
571
567
|
# APPLY operator requires installation and deletion of script file.
|
|
572
568
|
# Get the UserEnv object and store it in a variable.
|
|
@@ -588,10 +584,6 @@ class _TableOperatorUtils:
|
|
|
588
584
|
raise
|
|
589
585
|
finally:
|
|
590
586
|
self.__remove_file_and_delete_entry_from_gc(remove_from_sql_eng=False)
|
|
591
|
-
else:
|
|
592
|
-
# For test_mode, call apply_op_obj.test_script()
|
|
593
|
-
# with the required LOCAL or SANDBOX mode.
|
|
594
|
-
raise NotImplementedError()
|
|
595
587
|
|
|
596
588
|
def __remove_file_and_delete_entry_from_gc(self,
|
|
597
589
|
remove_from_sql_eng=True):
|
|
@@ -621,7 +613,7 @@ class _TableOperatorUtils:
|
|
|
621
613
|
"""
|
|
622
614
|
if remove_from_sql_eng:
|
|
623
615
|
# Remove file from Vantage, suppressing it's output.
|
|
624
|
-
remove_file(file_identifier=self.
|
|
616
|
+
remove_file(file_identifier=self.script_base_name, force_remove=True,
|
|
625
617
|
suppress_output=True)
|
|
626
618
|
|
|
627
619
|
# For apply, remove file from remote user environment.
|
teradataml/utils/validators.py
CHANGED
|
@@ -9,6 +9,31 @@ from teradataml.common.messages import MessageCodes, Messages
|
|
|
9
9
|
from teradataml.utils.dtypes import _Dtypes, _DtypesMappers, _ListOf, _TupleOf
|
|
10
10
|
from teradataml.options.configure import configure
|
|
11
11
|
from teradataml.dataframe.sql_interfaces import ColumnExpression
|
|
12
|
+
from functools import wraps, reduce
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def skip_validation():
|
|
16
|
+
"""
|
|
17
|
+
DESCRIPTION:
|
|
18
|
+
Define for skipping the validation.
|
|
19
|
+
|
|
20
|
+
PARAMETERS:
|
|
21
|
+
None
|
|
22
|
+
|
|
23
|
+
EXAMPLES:
|
|
24
|
+
@skip_validation(skip_all=True)
|
|
25
|
+
def validation_func(): ...
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
def decorator(func):
|
|
29
|
+
def wrapper(*args, **kwargs):
|
|
30
|
+
# If "skip_all" flag is set to False,
|
|
31
|
+
# skip all validation execution.
|
|
32
|
+
if not _Validators.skip_all:
|
|
33
|
+
return func(*args, **kwargs)
|
|
34
|
+
return wraps(func)(wrapper)
|
|
35
|
+
return decorator
|
|
36
|
+
|
|
12
37
|
|
|
13
38
|
class _Validators:
|
|
14
39
|
"""
|
|
@@ -30,7 +55,12 @@ class _Validators:
|
|
|
30
55
|
11. Validate whether the given file is not empty, given absolute file path.
|
|
31
56
|
12. Validate whether "arg1" and "arg2" are mutually inclusive.
|
|
32
57
|
"""
|
|
58
|
+
|
|
59
|
+
# "skip_all" specifies to skip all the executions.
|
|
60
|
+
skip_all = False
|
|
61
|
+
|
|
33
62
|
@staticmethod
|
|
63
|
+
@skip_validation()
|
|
34
64
|
def __getTypeAsStr(type_list):
|
|
35
65
|
"""
|
|
36
66
|
Function to convert type to string.
|
|
@@ -74,6 +104,7 @@ class _Validators:
|
|
|
74
104
|
return type_as_str
|
|
75
105
|
|
|
76
106
|
@staticmethod
|
|
107
|
+
@skip_validation()
|
|
77
108
|
def _check_isinstance(obj, class_or_tuple):
|
|
78
109
|
"""
|
|
79
110
|
Function checks whether an object is an instance of a class.
|
|
@@ -124,6 +155,7 @@ class _Validators:
|
|
|
124
155
|
return type(obj) == class_or_tuple
|
|
125
156
|
|
|
126
157
|
@staticmethod
|
|
158
|
+
@skip_validation()
|
|
127
159
|
def _validate_columnexpression_dataframe_has_columns(columns,
|
|
128
160
|
arg_name,
|
|
129
161
|
column_expression):
|
|
@@ -164,12 +196,12 @@ class _Validators:
|
|
|
164
196
|
"""
|
|
165
197
|
if not columns:
|
|
166
198
|
return True
|
|
167
|
-
|
|
199
|
+
from teradataml.common.utils import UtilFuncs
|
|
168
200
|
# Converting columns to a list if string is passed.
|
|
169
201
|
if not isinstance(columns, list):
|
|
170
202
|
columns = [columns]
|
|
171
203
|
|
|
172
|
-
df_columns =
|
|
204
|
+
df_columns = UtilFuncs._all_df_columns(column_expression)
|
|
173
205
|
|
|
174
206
|
# Let's validate existence of each column one by one.
|
|
175
207
|
for column_name in columns:
|
|
@@ -183,6 +215,66 @@ class _Validators:
|
|
|
183
215
|
return True
|
|
184
216
|
|
|
185
217
|
@staticmethod
|
|
218
|
+
@skip_validation()
|
|
219
|
+
def _validate_invalid_column_types(all_columns, column_arg, columns_to_check, invalid_types):
|
|
220
|
+
"""
|
|
221
|
+
DESCRIPTION:
|
|
222
|
+
Function to validate the invalid types for "columns_to_check" from "all_columns".
|
|
223
|
+
|
|
224
|
+
PARAMETERS:
|
|
225
|
+
all_columns:
|
|
226
|
+
Required Argument.
|
|
227
|
+
Specifies the ColumnExpressions.
|
|
228
|
+
Types: List of ColumnExpression
|
|
229
|
+
|
|
230
|
+
column_arg:
|
|
231
|
+
Required Argument.
|
|
232
|
+
Specifies the name of the argument.
|
|
233
|
+
Types: str
|
|
234
|
+
|
|
235
|
+
columns_to_check:
|
|
236
|
+
Required Argument.
|
|
237
|
+
Specifies columns to check for invalid types.
|
|
238
|
+
Types: str OR list of str OR ColumnExpression OR list of ColumnExpression
|
|
239
|
+
|
|
240
|
+
invalid_types:
|
|
241
|
+
Required Argument.
|
|
242
|
+
Specifies list of invalid teradata types to check against "columns".
|
|
243
|
+
Types: list
|
|
244
|
+
|
|
245
|
+
RAISES:
|
|
246
|
+
ValueError
|
|
247
|
+
|
|
248
|
+
RETURNS:
|
|
249
|
+
bool
|
|
250
|
+
|
|
251
|
+
EXAMPLES:
|
|
252
|
+
_Validators._validate_invalid_column_types(columns, column_arg, invalid_types)
|
|
253
|
+
"""
|
|
254
|
+
columns_and_types = {c.name.lower(): type(c.type) for c in all_columns}
|
|
255
|
+
get_col_type = lambda column: columns_and_types[column.lower()].__name__ if isinstance(
|
|
256
|
+
column, str) else column.type.__class__.__name__
|
|
257
|
+
|
|
258
|
+
invalid_types = ["{}({})".format(column if isinstance(column, str) else column.name, get_col_type(column))
|
|
259
|
+
for column in columns_to_check if get_col_type(column)
|
|
260
|
+
in [t.__name__ for t in _Dtypes._get_sort_unsupported_data_types()]
|
|
261
|
+
]
|
|
262
|
+
|
|
263
|
+
if invalid_types:
|
|
264
|
+
invalid_column_types = (col_type.__name__ for col_type in
|
|
265
|
+
_Dtypes._get_sort_unsupported_data_types())
|
|
266
|
+
error_message = Messages.get_message(MessageCodes.INVALID_COLUMN_DATATYPE,
|
|
267
|
+
", ".join(invalid_types),
|
|
268
|
+
column_arg,
|
|
269
|
+
"Unsupported",
|
|
270
|
+
", ".join(invalid_column_types))
|
|
271
|
+
|
|
272
|
+
raise ValueError(error_message)
|
|
273
|
+
|
|
274
|
+
return True
|
|
275
|
+
|
|
276
|
+
@staticmethod
|
|
277
|
+
@skip_validation()
|
|
186
278
|
def _validate_dataframe_has_argument_columns(columns, column_arg, data, data_arg, is_partition_arg=False):
|
|
187
279
|
"""
|
|
188
280
|
Function to check whether column names in columns are present in given dataframe or not.
|
|
@@ -282,6 +374,7 @@ class _Validators:
|
|
|
282
374
|
data_arg=data_arg)
|
|
283
375
|
|
|
284
376
|
@staticmethod
|
|
377
|
+
@skip_validation()
|
|
285
378
|
def _validate_column_exists_in_dataframe(columns, metaexpr, case_insensitive=False, column_arg=None,
|
|
286
379
|
data_arg=None, for_table=False):
|
|
287
380
|
"""
|
|
@@ -375,6 +468,7 @@ class _Validators:
|
|
|
375
468
|
return True
|
|
376
469
|
|
|
377
470
|
@staticmethod
|
|
471
|
+
@skip_validation()
|
|
378
472
|
def _validate_engine(engine):
|
|
379
473
|
"""
|
|
380
474
|
Function to validate whether the argument engine is supported or not.
|
|
@@ -403,6 +497,7 @@ class _Validators:
|
|
|
403
497
|
return True
|
|
404
498
|
|
|
405
499
|
@staticmethod
|
|
500
|
+
@skip_validation()
|
|
406
501
|
def _validate_function_arguments(arg_list, skip_empty_check = None):
|
|
407
502
|
"""
|
|
408
503
|
Method to verify that the input arguments are of valid data type except for
|
|
@@ -516,6 +611,7 @@ class _Validators:
|
|
|
516
611
|
return True
|
|
517
612
|
|
|
518
613
|
@staticmethod
|
|
614
|
+
@skip_validation()
|
|
519
615
|
def _validate_input_columns_not_empty(arg, arg_name, skip_empty_check = None):
|
|
520
616
|
"""
|
|
521
617
|
Function to check whether argument is empty string or not.
|
|
@@ -553,6 +649,7 @@ class _Validators:
|
|
|
553
649
|
return True
|
|
554
650
|
|
|
555
651
|
@staticmethod
|
|
652
|
+
@skip_validation()
|
|
556
653
|
def _validate_missing_required_arguments(arg_list):
|
|
557
654
|
"""
|
|
558
655
|
Method to check whether the required arguments passed to the function are missing
|
|
@@ -593,6 +690,7 @@ class _Validators:
|
|
|
593
690
|
return True
|
|
594
691
|
|
|
595
692
|
@staticmethod
|
|
693
|
+
@skip_validation()
|
|
596
694
|
def _validate_permitted_values(arg, permitted_values, arg_name, case_insensitive=True, includeNone=True, supported_types=None):
|
|
597
695
|
"""
|
|
598
696
|
Function to check the permitted values for the argument.
|
|
@@ -715,6 +813,7 @@ class _Validators:
|
|
|
715
813
|
return True
|
|
716
814
|
|
|
717
815
|
@staticmethod
|
|
816
|
+
@skip_validation()
|
|
718
817
|
def _validate_positive_int(arg, arg_name, lbound=0, ubound=None, lbound_inclusive=False):
|
|
719
818
|
"""
|
|
720
819
|
Validation to check arg values is a positive int.
|
|
@@ -781,6 +880,7 @@ class _Validators:
|
|
|
781
880
|
return True
|
|
782
881
|
|
|
783
882
|
@staticmethod
|
|
883
|
+
@skip_validation()
|
|
784
884
|
def _validate_argument_range(arg,
|
|
785
885
|
arg_name,
|
|
786
886
|
lbound=None,
|
|
@@ -889,6 +989,7 @@ class _Validators:
|
|
|
889
989
|
return True
|
|
890
990
|
|
|
891
991
|
@staticmethod
|
|
992
|
+
@skip_validation()
|
|
892
993
|
def _validate_vantage_version(vantage_version):
|
|
893
994
|
"""
|
|
894
995
|
Function to verify whether the given vantage_version is
|
|
@@ -920,6 +1021,7 @@ class _Validators:
|
|
|
920
1021
|
return True
|
|
921
1022
|
|
|
922
1023
|
@staticmethod
|
|
1024
|
+
@skip_validation()
|
|
923
1025
|
def _validate_timebucket_duration(timebucket_duration, timebucket_duration_arg_name='timebucket_duration'):
|
|
924
1026
|
"""
|
|
925
1027
|
Internal function to validate timeduration_bucket specified when creating a
|
|
@@ -976,6 +1078,7 @@ class _Validators:
|
|
|
976
1078
|
'equivalent notation'))
|
|
977
1079
|
|
|
978
1080
|
@staticmethod
|
|
1081
|
+
@skip_validation()
|
|
979
1082
|
def _validate_column_type(df, col, col_arg, expected_types, raiseError = True):
|
|
980
1083
|
"""
|
|
981
1084
|
Internal function to validate the type of an input DataFrame column against
|
|
@@ -1002,7 +1105,7 @@ class _Validators:
|
|
|
1002
1105
|
Required Argument.
|
|
1003
1106
|
Specifies a list of teradatasqlachemy datatypes that the column is
|
|
1004
1107
|
expected to be of type.
|
|
1005
|
-
Types: list of
|
|
1108
|
+
Types: list of teradatasqlalchemy types
|
|
1006
1109
|
|
|
1007
1110
|
raiseError:
|
|
1008
1111
|
Optional Argument.
|
|
@@ -1031,6 +1134,7 @@ class _Validators:
|
|
|
1031
1134
|
return True
|
|
1032
1135
|
|
|
1033
1136
|
@staticmethod
|
|
1137
|
+
@skip_validation()
|
|
1034
1138
|
def _validate_aggr_operation_unsupported_datatype(operation, columns, td_column_names_and_types):
|
|
1035
1139
|
"""
|
|
1036
1140
|
Internal function to validate the for unsupported data types of an input DataFrame column for
|
|
@@ -1081,6 +1185,7 @@ class _Validators:
|
|
|
1081
1185
|
raise TeradataMlException(msg, MessageCodes.TDMLDF_AGGREGATE_COMBINED_ERR)
|
|
1082
1186
|
|
|
1083
1187
|
@staticmethod
|
|
1188
|
+
@skip_validation()
|
|
1084
1189
|
def _validate_str_arg_length(arg_name, arg_value, op, length):
|
|
1085
1190
|
"""
|
|
1086
1191
|
Internal function to validate the length of a string passed as an argument.
|
|
@@ -1125,6 +1230,7 @@ class _Validators:
|
|
|
1125
1230
|
return _Validators._validate_arg_length(arg_name=arg_name, arg_value=arg_value, op=op, length=length)
|
|
1126
1231
|
|
|
1127
1232
|
@staticmethod
|
|
1233
|
+
@skip_validation()
|
|
1128
1234
|
def _validate_arg_length(arg_name, arg_value, op, length):
|
|
1129
1235
|
"""
|
|
1130
1236
|
Internal function to validate the length of an argument.
|
|
@@ -1196,6 +1302,7 @@ class _Validators:
|
|
|
1196
1302
|
return True
|
|
1197
1303
|
|
|
1198
1304
|
@staticmethod
|
|
1305
|
+
@skip_validation()
|
|
1199
1306
|
def _validate_file_exists(file_path):
|
|
1200
1307
|
"""
|
|
1201
1308
|
DESCRIPTION:
|
|
@@ -1224,6 +1331,7 @@ class _Validators:
|
|
|
1224
1331
|
return True
|
|
1225
1332
|
|
|
1226
1333
|
@staticmethod
|
|
1334
|
+
@skip_validation()
|
|
1227
1335
|
def _validate_mutually_exclusive_arguments(arg1, err_disp_arg1_name, arg2,
|
|
1228
1336
|
err_disp_arg2_name, skip_all_none_check=False):
|
|
1229
1337
|
"""
|
|
@@ -1278,6 +1386,7 @@ class _Validators:
|
|
|
1278
1386
|
return True
|
|
1279
1387
|
|
|
1280
1388
|
@staticmethod
|
|
1389
|
+
@skip_validation()
|
|
1281
1390
|
def _validate_unexpected_column_type(df, col, col_arg, unexpected_types, check_exist=True, raise_error=True):
|
|
1282
1391
|
"""
|
|
1283
1392
|
Internal function to validate the column existence and type of an input DataFrame column against
|
|
@@ -1363,6 +1472,7 @@ class _Validators:
|
|
|
1363
1472
|
return True
|
|
1364
1473
|
|
|
1365
1474
|
@staticmethod
|
|
1475
|
+
@skip_validation()
|
|
1366
1476
|
def _validate_dependent_argument(dependent_arg, dependent_arg_value, independent_arg, independent_arg_value,
|
|
1367
1477
|
msg_arg_value=None):
|
|
1368
1478
|
"""
|
|
@@ -1428,6 +1538,7 @@ class _Validators:
|
|
|
1428
1538
|
return True
|
|
1429
1539
|
|
|
1430
1540
|
@staticmethod
|
|
1541
|
+
@skip_validation()
|
|
1431
1542
|
def _validate_py_type_for_td_type_conversion(py_type, py_type_arg_name):
|
|
1432
1543
|
"""
|
|
1433
1544
|
DESCRIPTION:
|
|
@@ -1463,6 +1574,7 @@ class _Validators:
|
|
|
1463
1574
|
raise TeradataMlException(error_msg, error_code)
|
|
1464
1575
|
|
|
1465
1576
|
@staticmethod
|
|
1577
|
+
@skip_validation()
|
|
1466
1578
|
def _validate_function_install_location_is_set(option, function_type, option_name):
|
|
1467
1579
|
"""
|
|
1468
1580
|
DESCRIPTION:
|
|
@@ -1506,6 +1618,7 @@ class _Validators:
|
|
|
1506
1618
|
raise TeradataMlException(message, MessageCodes.MISSING_ARGS)
|
|
1507
1619
|
|
|
1508
1620
|
@staticmethod
|
|
1621
|
+
@skip_validation()
|
|
1509
1622
|
def _check_table_exists(conn, table_name,
|
|
1510
1623
|
schema_name,
|
|
1511
1624
|
raise_error_if_does_not_exists=True,
|
|
@@ -1556,6 +1669,7 @@ class _Validators:
|
|
|
1556
1669
|
return False
|
|
1557
1670
|
|
|
1558
1671
|
@staticmethod
|
|
1672
|
+
@skip_validation()
|
|
1559
1673
|
def _check_empty_file(file_path):
|
|
1560
1674
|
"""
|
|
1561
1675
|
Description:
|
|
@@ -1586,6 +1700,7 @@ class _Validators:
|
|
|
1586
1700
|
return True
|
|
1587
1701
|
|
|
1588
1702
|
@staticmethod
|
|
1703
|
+
@skip_validation()
|
|
1589
1704
|
def _validate_mutually_inclusive_arguments(arg1, err_disp_arg1_name, arg2,
|
|
1590
1705
|
err_disp_arg2_name):
|
|
1591
1706
|
"""
|
|
@@ -1638,6 +1753,7 @@ class _Validators:
|
|
|
1638
1753
|
return True
|
|
1639
1754
|
|
|
1640
1755
|
@staticmethod
|
|
1756
|
+
@skip_validation()
|
|
1641
1757
|
def _validate_file_extension(file_path, extension):
|
|
1642
1758
|
"""
|
|
1643
1759
|
DESCRIPTION:
|
|
@@ -1674,7 +1790,9 @@ class _Validators:
|
|
|
1674
1790
|
|
|
1675
1791
|
return True
|
|
1676
1792
|
|
|
1793
|
+
|
|
1677
1794
|
@staticmethod
|
|
1795
|
+
@skip_validation()
|
|
1678
1796
|
def _validate_argument_is_not_None(arg, arg_name, additional_error="", reverse=False):
|
|
1679
1797
|
"""
|
|
1680
1798
|
DESCRIPTION:
|
|
@@ -1730,6 +1848,7 @@ class _Validators:
|
|
|
1730
1848
|
|
|
1731
1849
|
|
|
1732
1850
|
@staticmethod
|
|
1851
|
+
@skip_validation()
|
|
1733
1852
|
def _validate_dataframe(df, raise_error=True):
|
|
1734
1853
|
"""
|
|
1735
1854
|
This is an internal function checks whether the dataframe is none
|
|
@@ -1774,6 +1893,7 @@ class _Validators:
|
|
|
1774
1893
|
|
|
1775
1894
|
|
|
1776
1895
|
@staticmethod
|
|
1896
|
+
@skip_validation()
|
|
1777
1897
|
def _validate_column_value_length(argument_name, argument_value, allowed_length,
|
|
1778
1898
|
operation='perform the operation'):
|
|
1779
1899
|
"""
|
|
@@ -1826,6 +1946,7 @@ class _Validators:
|
|
|
1826
1946
|
|
|
1827
1947
|
|
|
1828
1948
|
@staticmethod
|
|
1949
|
+
@skip_validation()
|
|
1829
1950
|
def _validate_list_lengths_equal(list1, arg_name1, list2, arg_name2):
|
|
1830
1951
|
"""
|
|
1831
1952
|
DESCRIPTION:
|
|
@@ -1872,6 +1993,7 @@ class _Validators:
|
|
|
1872
1993
|
return True
|
|
1873
1994
|
|
|
1874
1995
|
@staticmethod
|
|
1996
|
+
@skip_validation()
|
|
1875
1997
|
def _validate_dict_argument_key_value(arg_name, arg_dict, key_types=None, value_types=None,
|
|
1876
1998
|
key_permitted_values=None, value_permitted_values=None,
|
|
1877
1999
|
value_empty_string=True):
|
|
@@ -2036,6 +2158,7 @@ class _Validators:
|
|
|
2036
2158
|
return True
|
|
2037
2159
|
|
|
2038
2160
|
@staticmethod
|
|
2161
|
+
@skip_validation()
|
|
2039
2162
|
def _validate_http_response(http_response, valid_status_code, error_msg):
|
|
2040
2163
|
"""
|
|
2041
2164
|
DESCRIPTION:
|
|
@@ -2076,6 +2199,7 @@ class _Validators:
|
|
|
2076
2199
|
return True
|
|
2077
2200
|
|
|
2078
2201
|
@staticmethod
|
|
2202
|
+
@skip_validation()
|
|
2079
2203
|
def _validate_module_presence(module_name, function_name):
|
|
2080
2204
|
"""
|
|
2081
2205
|
DESCRIPTION:
|