Skip to content

Commit 24fcedd

Browse files
committed
Add type arguments to Iterable and Dict in ml_trained_model.py
1 parent 79c0cd6 commit 24fcedd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ml_rest_api/ml_trained_model/ml_trained_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def init() -> None:
3636
# feature_selector = joblib.load(full_path('feature_selector.pkl'))
3737

3838

39-
def run(input_data: Iterable) -> Dict:
39+
def run(input_data: Iterable[Any]) -> Dict[str, Any]:
4040
"""Makes a prediction using the trained ML model."""
4141
log.info("input_data:%s", input_data)
4242
data: pd.DataFrame = (
@@ -60,7 +60,7 @@ def run(input_data: Iterable) -> Dict:
6060
return {"prediction": prediction}
6161

6262

63-
def sample() -> Dict:
63+
def sample() -> Dict[str, Any]:
6464
"""Returns a sample input vector as a dictionary."""
6565
return {
6666
"int_param": 10,

0 commit comments

Comments
 (0)