Skip to content

Commit c82a835

Browse files
authored
Merge pull request #97 from wuyifan18/main
Fix eval for LocalizationTask on MongoDB
2 parents b956fbf + 0f032a6 commit c82a835

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

aiopslab/orchestrator/problems/revoke_auth/revoke_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def eval(self, soln: Any, trace: list[SessionItem], duration: float):
100100
# Calculate exact match and subset
101101
is_exact = is_exact_match(soln, self.faulty_service) or is_exact_match(soln, self.faulty_service.removeprefix("mongodb-")) # Given that monogodb-geo and geo are closely coupled
102102
# (likewise with rate), either pod should be an answer
103-
is_sub = is_subset([self.faulty_service], soln)
103+
is_sub = is_subset([self.faulty_service], soln) or is_subset([self.faulty_service.removeprefix("mongodb-")], soln)
104104

105105
# Determine accuracy
106106
if is_exact:

aiopslab/orchestrator/problems/storage_user_unregistered/storage_user_unregistered.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def eval(self, soln: Any, trace: list[SessionItem], duration: float):
106106
# Given that monogodb-geo and geo are closely coupled
107107
# (likewise with rate), either pod should be an answer
108108
is_exact = is_exact_match(soln, self.faulty_service) or is_exact_match(soln, self.faulty_service.removeprefix("mongodb-"))
109-
is_sub = is_subset([self.faulty_service], soln)
109+
is_sub = is_subset([self.faulty_service], soln) or is_subset([self.faulty_service.removeprefix("mongodb-")], soln)
110110

111111
# Determine accuracy
112112
if is_exact:

0 commit comments

Comments
 (0)