Skip to content

Commit 1730bd8

Browse files
authored
Revert "fix(automl): pass params to underlying client (#9794)"
This reverts commit 972e5b4.
1 parent 972e5b4 commit 1730bd8

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

automl/google/cloud/automl_v1beta1/tables/tables_client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2596,7 +2596,6 @@ def predict(
25962596
model=None,
25972597
model_name=None,
25982598
model_display_name=None,
2599-
params=None,
26002599
project=None,
26012600
region=None,
26022601
**kwargs
@@ -2643,9 +2642,6 @@ def predict(
26432642
The `model` instance you want to predict with . This must be
26442643
supplied if `model_display_name` or `model_name` are not
26452644
supplied.
2646-
params (dict[str, str]):
2647-
`feature_importance` can be set as True to enable local
2648-
explainability. The default is false.
26492645
26502646
Returns:
26512647
A :class:`~google.cloud.automl_v1beta1.types.PredictResponse`
@@ -2687,7 +2683,7 @@ def predict(
26872683

26882684
request = {"row": {"values": values}}
26892685

2690-
return self.prediction_client.predict(model.name, request, params, **kwargs)
2686+
return self.prediction_client.predict(model.name, request, **kwargs)
26912687

26922688
def batch_predict(
26932689
self,

automl/tests/unit/gapic/v1beta1/test_tables_client_v1beta1.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ def test_predict_from_array(self):
11171117
client = self.tables_client({"get_model.return_value": model}, {})
11181118
client.predict(["1"], model_name="my_model")
11191119
client.prediction_client.predict.assert_called_with(
1120-
"my_model", {"row": {"values": [{"string_value": "1"}]}}, None
1120+
"my_model", {"row": {"values": [{"string_value": "1"}]}}
11211121
)
11221122

11231123
def test_predict_from_dict(self):
@@ -1134,7 +1134,6 @@ def test_predict_from_dict(self):
11341134
client.prediction_client.predict.assert_called_with(
11351135
"my_model",
11361136
{"row": {"values": [{"string_value": "1"}, {"string_value": "2"}]}},
1137-
None,
11381137
)
11391138

11401139
def test_predict_from_dict_missing(self):
@@ -1149,9 +1148,7 @@ def test_predict_from_dict_missing(self):
11491148
client = self.tables_client({"get_model.return_value": model}, {})
11501149
client.predict({"a": "1"}, model_name="my_model")
11511150
client.prediction_client.predict.assert_called_with(
1152-
"my_model",
1153-
{"row": {"values": [{"string_value": "1"}, {"null_value": 0}]}},
1154-
None,
1151+
"my_model", {"row": {"values": [{"string_value": "1"}, {"null_value": 0}]}}
11551152
)
11561153

11571154
def test_predict_all_types(self):
@@ -1213,7 +1210,6 @@ def test_predict_all_types(self):
12131210
]
12141211
}
12151212
},
1216-
None,
12171213
)
12181214

12191215
def test_predict_from_array_missing(self):

0 commit comments

Comments
 (0)