diff --git a/.gitignore b/.gitignore index c84066d..e9387ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Python .venv __pycache__ +.python-version # Docs docs/_build diff --git a/graphbook/state.py b/graphbook/state.py index 87ae867..84f3e3e 100644 --- a/graphbook/state.py +++ b/graphbook/state.py @@ -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() diff --git a/graphbook/web.py b/graphbook/web.py index 10b5705..b6f23e6 100644 --- a/graphbook/web.py +++ b/graphbook/web.py @@ -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()