Add error message

This commit is contained in:
Nuno Campos
2024-08-21 09:41:53 -07:00
parent f037a2e9cb
commit 1af0367b34
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -650,7 +650,7 @@ class Pregel(
# apply to checkpoint and save
assert not apply_writes(
checkpoint, channels, [task], self.checkpointer.get_next_version
)
), "Can't write to SharedValues from update_state"
checkpoint = create_checkpoint(checkpoint, channels, step + 1)
# check interrupt before
if tasks := should_interrupt(
@@ -794,7 +794,7 @@ class Pregel(
# apply to checkpoint and save
assert not apply_writes(
checkpoint, channels, [task], self.checkpointer.get_next_version
)
), "Can't write to SharedValues from update_state"
checkpoint = create_checkpoint(checkpoint, channels, step + 1)
# check interrupt before
if tasks := should_interrupt(
+2 -3
View File
@@ -332,13 +332,12 @@ class PregelLoop:
manager=None,
)
# apply input writes
mv_writes = apply_writes(
assert not apply_writes(
self.checkpoint,
self.channels,
discard_tasks + [PregelTaskWrites(INPUT, input_writes, [])],
self.checkpointer_get_next_version,
)
assert not mv_writes
), "Can't write to SharedValues in graph input"
# save input checkpoint
self._put_checkpoint({"source": "input", "writes": self.input})
else: