Skip to content

Commit

Permalink
Fixed function call to predict_labels_with_n in TestRunGreedyModel
Browse files Browse the repository at this point in the history
Updated function call to predict_labels_with_n() as per latest changes to include trip_list and user_id

Fixed typo in eacilp for trip.get_id()
  • Loading branch information
Mahadik, Mukul Chandrakant authored and Mahadik, Mukul Chandrakant committed Nov 17, 2023
1 parent fb278ff commit 30c02a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def compute_and_save_ensemble(self, trip_list, predictions_dict):
il_list = []
for trip, key in zip(trip_list, predictions_dict):
# Print trip ids to see if order maintained:
print(f"Trip_ID: {trip.get_id} and Pred_Key: {key}")
print(f"Trip_ID: {trip.get_id()} and Pred_Key: {key}")
il = ecwl.Labelprediction()
il.trip_id = trip.get_id()
il.start_ts = trip["data"]["start_ts"]
Expand Down
3 changes: 2 additions & 1 deletion emission/tests/modellingTests/TestRunGreedyModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def test1RoundTripGreedySimilarityBinning(self):
destination=self.destination
)
prediction, n = eamur.predict_labels_with_n(
trip = test,
user_id = self.user_id,
trip = [test],
model_type=eamumt.ModelType.GREEDY_SIMILARITY_BINNING,
model_storage=eamums.ModelStorage.DOCUMENT_DATABASE,
model_config=greedy_model_config
Expand Down

0 comments on commit 30c02a4

Please sign in to comment.