Skip to content

Commit 6ab825f

Browse files
committed
FEAT(net): add skip_evictions flag in configs
1 parent a8a61aa commit 6ab825f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

graphtik/network.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
execution_configs: ContextVar[dict] = ContextVar(
8585
"execution_configs",
86-
default={"thread_pool": Pool(7), "abort": False},
86+
default={"thread_pool": Pool(7), "abort": False, "skip_evictions": False},
8787
)
8888

8989

@@ -103,6 +103,10 @@ def is_abort():
103103
return execution_configs.get()["abort"]
104104

105105

106+
def is_skip_evictions():
107+
return execution_configs.get()["skip_evictions"]
108+
109+
106110
class _DataNode(str):
107111
"""
108112
Dag node naming a data-value produced or required by an operation.
@@ -642,7 +646,7 @@ def add_step_once(step):
642646
steps.append(node)
643647

644648
# NO EVICTIONS when no specific outputs asked.
645-
if not outputs:
649+
if not outputs or is_skip_evictions():
646650
continue
647651

648652
# Add EVICT (1) for operation's needs.

0 commit comments

Comments
 (0)