You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have I written custom code (as opposed to using a stock example script
provided in TensorFlow Model Analysis): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 22.04
TensorFlow Model Analysis installed from (source or binary): source
TensorFlow Model Analysis version (use command below): 0.47.0.dev
Python version: 3.9, 3.10
Jupyter Notebook version:
Exact command to reproduce: $ pytest
Describe the problem
Before PR #183, running pytest yields several errors. One such repeated error is
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testAnalyzeRawData - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
This error is repeated for many tests (listed below).
I have included a temporary fix in #183 by including
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testAnalyzeRawData - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testBytesProcessedCountForRecordBatches - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testBytesProcessedCountForSerializedExamples - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysis - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisMultiMicroAggregationNoHistogram - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisMultiMicroAggregationWithHistogram - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithDeterministicConfidenceIntervals - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithExplicitModelAgnosticPredictions - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithKerasModelrubber_stamp - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithKerasModeltf_js - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithKerasModeltf_keras - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithKerasModeltf_keras_custom_metrics - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithKerasModeltf_lite - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithKerasMultiOutputModel - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithQueryBasedMetrics - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithSchema - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testRunModelAnalysisWithUncertainty - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py::MetricsPlotsAndValidationsEvaluatorTest::testEvaluateWithAttributions - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py::MetricsPlotsAndValidationsEvaluatorTest::testEvaluateWithJackknifeAndDiffMetrics - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py::MetricsPlotsAndValidationsEvaluatorTest::testEvaluateWithKerasAndDiffMetrics - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py::MetricsPlotsAndValidationsEvaluatorTest::testEvaluateWithKerasModelWithInGraphMetricscompiled_metrics - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py::MetricsPlotsAndValidationsEvaluatorTest::testEvaluateWithKerasModelWithInGraphMetricsevaluate - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/evaluators/metrics_plots_and_validations_evaluator_test.py::MetricsPlotsAndValidationsEvaluatorTest::testMetricsSpecsCountersInModelAgnosticMode - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/counterfactual_predictions_extractor_test.py::CounterfactualPredictionsExtactorTest::test_cf_predictions_extractor_single_cf - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/counterfactual_predictions_extractor_test.py::CounterfactualPredictionsExtactorTest::test_cf_predictions_extractor_single_non_cf_multiple_cf - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/counterfactual_predictions_extractor_test.py::CounterfactualPredictionsExtactorTest::test_cf_predictions_extractor_single_non_cf_single_cf - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/example_weights_extractor_test.py::ExampleWeightsExtractorTest::testExampleWeightsExtractorMultiModel - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/example_weights_extractor_test.py::ExampleWeightsExtractorTest::testExampleWeightsExtractorMultiOutput - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/example_weights_extractor_test.py::ExampleWeightsExtractorTest::testExampleWeightsExtractorwith_example_weight - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/example_weights_extractor_test.py::ExampleWeightsExtractorTest::testExampleWeightsExtractorwithout_example_weight - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/features_extractor_test.py::FeaturesExtractorTest::test_features_extractor - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/features_extractor_test.py::FeaturesExtractorTest::test_features_extractor_no_features - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/labels_extractor_test.py::LabelsExtractorTest::testLabelsExtractorMultiModel - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/labels_extractor_test.py::LabelsExtractorTest::testLabelsExtractorMultiOutput - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/labels_extractor_test.py::LabelsExtractorTest::testLabelsExtractorwith_label - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/labels_extractor_test.py::LabelsExtractorTest::testLabelsExtractorwithout_label - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/legacy_input_extractor_test.py::InputExtractorTest::testInputExtractor - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/legacy_input_extractor_test.py::InputExtractorTest::testInputExtractorMultiModel - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/legacy_input_extractor_test.py::InputExtractorTest::testInputExtractorMultiOutput - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/materialized_predictions_extractor_test.py::MaterializedPredictionsExtractorTest::test_rekey_predictions_in_features - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/predictions_extractor_test.py::PredictionsExtractorTest::testBatchSizeLimitWithKerasModel - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/predictions_extractor_test.py::PredictionsExtractorTest::testPredictionsExtractorWithKerasModelModelSignaturesDoFnInferenceCallableModel - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/predictions_extractor_test.py::PredictionsExtractorTest::testPredictionsExtractorWithKerasModelModelSignaturesDoFnInferenceServingDefault - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/predictions_extractor_test.py::PredictionsExtractorTest::testPredictionsExtractorWithSequentialKerasModelModelSignaturesDoFnInferenceCallableModel - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/predictions_extractor_test.py::PredictionsExtractorTest::testPredictionsExtractorWithSequentialKerasModelModelSignaturesDoFnInferenceServingDefault - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/predictions_extractor_test.py::PredictionsExtractorTest::testRekeyPredictionsInFeaturesForPrematerializedPredictions - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/sql_slice_key_extractor_test.py::SqlSliceKeyExtractorTest::testSqlSliceKeyExtractor - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/sql_slice_key_extractor_test.py::SqlSliceKeyExtractorTest::testSqlSliceKeyExtractorWithCrossSlices - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/sql_slice_key_extractor_test.py::SqlSliceKeyExtractorTest::testSqlSliceKeyExtractorWithEmptySqlConfig - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/sql_slice_key_extractor_test.py::SqlSliceKeyExtractorTest::testSqlSliceKeyExtractorWithMultipleSchema - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tfjs_predict_extractor_test.py::TFJSPredictExtractorTest::testTFJSPredictExtractorWithKerasModelmulti_model_multi_output_batched_examples_batched_inputs - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tfjs_predict_extractor_test.py::TFJSPredictExtractorTest::testTFJSPredictExtractorWithKerasModelmulti_model_single_output - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tfjs_predict_extractor_test.py::TFJSPredictExtractorTest::testTFJSPredictExtractorWithKerasModelsingle_model_multi_output - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tfjs_predict_extractor_test.py::TFJSPredictExtractorTest::testTFJSPredictExtractorWithKerasModelsingle_model_single_output - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel0 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel1 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel10 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel11 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel12 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel13 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel14 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel15 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel2 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel3 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel4 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel5 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel6 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel7 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel8 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py::TFLitePredictExtractorTest::testTFlitePredictExtractorWithKerasModel9 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/transformed_features_extractor_test.py::TransformedFeaturesExtractorTest::testPreprocessedFeaturesExtractorkeras_custom - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/transformed_features_extractor_test.py::TransformedFeaturesExtractorTest::testPreprocessedFeaturesExtractorkeras_defaults - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/transformed_features_extractor_test.py::TransformedFeaturesExtractorTest::testPreprocessedFeaturesExtractortf_custom - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/transformed_features_extractor_test.py::TransformedFeaturesExtractorTest::testPreprocessedFeaturesExtractortf_defaults - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/unbatch_extractor_test.py::UnbatchExtractorTest::testUnbatchExtractor - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/unbatch_extractor_test.py::UnbatchExtractorTest::testUnbatchExtractorMultiModel - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/extractors/unbatch_extractor_test.py::UnbatchExtractorTest::testUnbatchExtractorMultiOutput - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/example_count_test.py::ExampleCountEnd2EndTest::testExampleCountsWithoutLabelPredictions - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_confusion_matrix_metrics_test.py::ObjectDetectionConfusionMatrixMetricsTest::testObjectDetectionMetrics_max_recall - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_confusion_matrix_metrics_test.py::ObjectDetectionConfusionMatrixMetricsTest::testObjectDetectionMetrics_precision - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_confusion_matrix_metrics_test.py::ObjectDetectionConfusionMatrixMetricsTest::testObjectDetectionMetrics_precision_at_recall - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_confusion_matrix_metrics_test.py::ObjectDetectionConfusionMatrixMetricsTest::testObjectDetectionMetrics_recall - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_confusion_matrix_metrics_test.py::ObjectDetectionConfusionMatrixMetricsTest::testObjectDetectionMetrics_threshold_at_recall - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_confusion_matrix_plot_test.py::ObjectDetectionConfusionMatrixPlotTest::testConfusionMatrixPlot - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithLargerData_average_precision_ave - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithLargerData_average_precision_iou0.5 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithLargerData_average_precision_iou0.75 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithLargerData_average_recall_arlarge - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithLargerData_average_recall_armedium - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithLargerData_average_recall_arsmall - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithLargerData_average_recall_mdet1 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithLargerData_average_recall_mdet10 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithLargerData_average_recall_mdet100 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/object_detection_metrics_test.py::ObjectDetectionMetricsTest::testMetricValuesWithSplittedData_average_precision_iou0.5 - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/score_distribution_plot_test.py::ScoreDistributionPlotTest::testScoreDistributionPlot - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/semantic_segmentation_confusion_matrix_metrics_test.py::SegmentationConfusionMatrixTest::testEncodedImage_fp_two_class_with_ignore - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/semantic_segmentation_confusion_matrix_metrics_test.py::SegmentationConfusionMatrixTest::testEncodedImage_tp_two_class_with_ignore - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/semantic_segmentation_confusion_matrix_metrics_test.py::SegmentationConfusionMatrixTest::testEncodedImage_two_class - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/semantic_segmentation_confusion_matrix_metrics_test.py::SegmentationConfusionMatrixTest::testEncodedImage_two_class_with_ignore - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/set_match_confusion_matrix_metrics_test.py::SetMatchConfusionMatrixMetricsTest::testSetMatchMetricsWithClassWeights_precision_with_class_weight - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/set_match_confusion_matrix_metrics_test.py::SetMatchConfusionMatrixMetricsTest::testSetMatchMetricsWithClassWeights_recall_with_class_weight - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/set_match_confusion_matrix_metrics_test.py::SetMatchConfusionMatrixMetricsTest::testSetMatchMetrics_precision - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/set_match_confusion_matrix_metrics_test.py::SetMatchConfusionMatrixMetricsTest::testSetMatchMetrics_precision_top_k - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/set_match_confusion_matrix_metrics_test.py::SetMatchConfusionMatrixMetricsTest::testSetMatchMetrics_recall - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/set_match_confusion_matrix_metrics_test.py::SetMatchConfusionMatrixMetricsTest::testSetMatchMetrics_recall_top_k - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/set_match_confusion_matrix_metrics_test.py::SetMatchConfusionMatrixMetricsTest::testSetMatchMetrics_recall_top_k_with_threshold_set - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/stats_test.py::MeanEnd2EndTest::testMeanEnd2End - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/metrics/stats_test.py::MeanEnd2EndTest::testMeanEnd2EndWithoutExampleWeights - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/utils/example_keras_model_test.py::ExampleModelTest::test_example_keras_model - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/writers/metrics_plots_and_validations_writer_test.py::MetricsPlotsAndValidationsWriterTest::testWriteAttributionsparquet_file_format - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/writers/metrics_plots_and_validations_writer_test.py::MetricsPlotsAndValidationsWriterTest::testWriteAttributionstfrecord_file_format - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/writers/metrics_plots_and_validations_writer_test.py::MetricsPlotsAndValidationsWriterTest::testWriteValidationResultsNoThresholdsparquet_file_format - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/writers/metrics_plots_and_validations_writer_test.py::MetricsPlotsAndValidationsWriterTest::testWriteValidationResultsNoThresholdstfrecord_file_format - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/writers/metrics_plots_and_validations_writer_test.py::MetricsPlotsAndValidationsWriterTest::testWriteValidationResultsparquet_file_format - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
FAILED tensorflow_model_analysis/writers/metrics_plots_and_validations_writer_test.py::MetricsPlotsAndValidationsWriterTest::testWriteValidationResultstfrecord_file_format - AttributeError: module 'tensorflow_model_analysis.api' has no attribute 'types'
The text was updated successfully, but these errors were encountered:
2. Check Import Structure in tensorflow_model_analysis.api
Your error message suggests that tensorflow_model_analysis.api.types is missing. Normally, TFMA exposes types through tensorflow_model_analysis.api.types, but if it's not included in the __init__.py, it might not be available.
To confirm:
importtensorflow_model_analysis.apiasapiprint(dir(api)) # Check if 'types' exists
If types is missing, your fix (adding from tensorflow_model_analysis.api import types to __init__.py) is reasonable, but we need to understand why it’s missing.
3. Confirm if types.py Exists in the Expected Location
Go to the tensorflow_model_analysis/api/ directory and check if types.py is present:
ls tensorflow_model_analysis/api/
If it’s missing, you may need to pull the latest code from the repository:
git pull origin main
Then, rebuild and reinstall.
4. Run Tests in an Isolated Environment
Conflicting installations of TFMA might cause issues. Run tests in a clean virtual environment:
Please go to Stack Overflow for help and support:
System information
provided in TensorFlow Model Analysis): No
$ pytest
Describe the problem
Before PR #183, running
pytest
yields several errors. One such repeated error isThis error is repeated for many tests (listed below).
I have included a temporary fix in #183 by including
to
tensorflow_model_analysis/api/__init__.py
. This gets rid of the error, but not of the deeper underlying issue.Source code / logs
The full traceback for the particular example (
tensorflow_model_analysis/api/model_eval_lib_test.py::EvaluateTest::testAnalyzeRawData
) above isThe list of tests with this error is
The text was updated successfully, but these errors were encountered: