diff --git a/examples/src/main/python/ml/fm_classifier_example.py b/examples/src/main/python/ml/fm_classifier_example.py index c9b20e3fe93cb..559bd6db7e767 100644 --- a/examples/src/main/python/ml/fm_classifier_example.py +++ b/examples/src/main/python/ml/fm_classifier_example.py @@ -66,7 +66,7 @@ accuracy = evaluator.evaluate(predictions) print("Test set accuracy = %g" % accuracy) - fmModel: FMClassificationModel = model.stages[2] # type: ignore[assignment] + fmModel: FMClassificationModel = model.stages[2] # type: ignore print("Factors: " + str(fmModel.factors)) print("Linear: " + str(fmModel.linear)) print("Intercept: " + str(fmModel.intercept)) diff --git a/examples/src/main/python/ml/fm_regressor_example.py b/examples/src/main/python/ml/fm_regressor_example.py index c6e398f145721..4cc26f74f56a2 100644 --- a/examples/src/main/python/ml/fm_regressor_example.py +++ b/examples/src/main/python/ml/fm_regressor_example.py @@ -63,7 +63,7 @@ rmse = evaluator.evaluate(predictions) print("Root Mean Squared Error (RMSE) on test data = %g" % rmse) - fmModel: FMRegressionModel = model.stages[1] # type: ignore[assignment] + fmModel: FMRegressionModel = model.stages[1] # type: ignore print("Factors: " + str(fmModel.factors)) print("Linear: " + str(fmModel.linear)) print("Intercept: " + str(fmModel.intercept)) diff --git a/examples/src/main/python/ml/logistic_regression_summary_example.py b/examples/src/main/python/ml/logistic_regression_summary_example.py index 8c3a5aa18fdfb..ecd4442fa634d 100644 --- a/examples/src/main/python/ml/logistic_regression_summary_example.py +++ b/examples/src/main/python/ml/logistic_regression_summary_example.py @@ -44,7 +44,7 @@ # in the earlier example trainingSummary: BinaryLogisticRegressionTrainingSummary = ( lrModel.summary - ) # type: ignore[assignment] + ) # type: ignore # Obtain the objective per iteration objectiveHistory = trainingSummary.objectiveHistory diff --git a/examples/src/main/python/ml/pipeline_example.py b/examples/src/main/python/ml/pipeline_example.py index 995bde89a1df2..66fdd73632a70 100644 --- a/examples/src/main/python/ml/pipeline_example.py +++ b/examples/src/main/python/ml/pipeline_example.py @@ -62,7 +62,7 @@ prediction = model.transform(test) selected = prediction.select("id", "text", "probability", "prediction") for row in selected.collect(): - rid, text, prob, prediction = row # type: ignore[no-redef] + rid, text, prob, prediction = row # type: ignore print( "(%d, %s) --> prob=%s, prediction=%f" % ( rid, text, str(prob), prediction # type: ignore