Skip to content

Commit

Permalink
Fixing some issues with Mac OS
Browse files Browse the repository at this point in the history
  • Loading branch information
rsamf committed Nov 27, 2024
1 parent 13346b7 commit 5787c60
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Python
.venv
__pycache__
.python-version

# Docs
docs/_build
Expand Down
4 changes: 2 additions & 2 deletions graphbook/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ def clear_outputs(self, node_id: str | None = None):
if node_id in self._queues:
self._queues[node_id].clear()
step = self._steps[node_id]
for p in step.parents:
self._queues[p.id].reset_consumer_idx(id(step))
for parent_id in self._step_graph["parent"][node_id]:
self._queues[parent_id].reset_consumer_idx(id(step))
self._step_states[node_id] = set()
self.view_manager.handle_queue_size(
node_id, self._queues[node_id].dict_sizes()
Expand Down
4 changes: 4 additions & 0 deletions graphbook/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,10 @@ def create_sample_workflow(workflow_dir, custom_nodes_path, docs_path):


def start_web(args):
# The start method on some systems like Mac default to spawn
if not args.spawn and mp.get_start_method() == "spawn":
mp.set_start_method("fork", force=True)

cmd_queue = mp.Queue()
parent_conn, child_conn = mp.Pipe()
view_manager_queue = mp.Queue()
Expand Down

0 comments on commit 5787c60

Please sign in to comment.