Skip to content

Commit 60a3249

Browse files
authored
Fix print when we have violated constraints (#166)
Before, we could have errors happening right on the get_log method because some nodes might not have any sharding chosen. This PR changes instead to print the violated constraints, so that we can have a clear error message to users
1 parent 716c19b commit 60a3249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoparallel/optimize_sharding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ def get_solution(self, verbose=False):
655655
self.res = [k for k, v in sol.items() if v == 1]
656656

657657
if self.prob.status == -1:
658-
print(self.get_log())
658+
print(self.get_violated_constraints_log())
659659
raise RuntimeError("Unsolvable problem")
660660

661661
opt = {}

0 commit comments

Comments
 (0)