Skip to content

Commit c8cea55

Browse files
committed
fix(demo): remove unpinned coordinode override from Colab install block
Previous fix installed coordinode from the git pin inside IN_COLAB, but the unconditional subprocess.run at the end of the cell still installed bare "coordinode" from PyPI — pip treated this as an upgrade and overrode the pinned version with whatever PyPI resolved to. Align 00/01/02 with 03's pattern: single _coordinode_spec variable that evaluates to the git-pin URL when IN_COLAB else bare "coordinode" for local dev.
1 parent 4f6a797 commit c8cea55

3 files changed

Lines changed: 18 additions & 42 deletions

File tree

demo/notebooks/00_seed_data.ipynb

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,28 +105,20 @@
105105
" check=True,\n",
106106
" timeout=600,\n",
107107
" )\n",
108-
" # SDK (gRPC client helpers used by LocalClient wrapper) must come from the same pin.\n",
109-
" subprocess.run(\n",
110-
" [\n",
111-
" sys.executable,\n",
112-
" \"-m\",\n",
113-
" \"pip\",\n",
114-
" \"install\",\n",
115-
" \"-q\",\n",
116-
" \"git+https://github.com/structured-world/coordinode-python.git@c2ce32064dd7f6495f0998049c0cc2f6f7a5767d#subdirectory=coordinode\",\n",
117-
" ],\n",
118-
" check=True,\n",
119-
" timeout=300,\n",
120-
" )\n",
121108
"\n",
109+
"_coordinode_spec = (\n",
110+
" \"git+https://github.com/structured-world/coordinode-python.git@c2ce32064dd7f6495f0998049c0cc2f6f7a5767d#subdirectory=coordinode\"\n",
111+
" if IN_COLAB\n",
112+
" else \"coordinode\"\n",
113+
")\n",
122114
"subprocess.run(\n",
123115
" [\n",
124116
" sys.executable,\n",
125117
" \"-m\",\n",
126118
" \"pip\",\n",
127119
" \"install\",\n",
128120
" \"-q\",\n",
129-
" \"coordinode\",\n",
121+
" _coordinode_spec,\n",
130122
" \"nest_asyncio\",\n",
131123
" ],\n",
132124
" check=True,\n",

demo/notebooks/01_llama_index_property_graph.ipynb

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,32 +93,24 @@
9393
" check=True,\n",
9494
" timeout=600,\n",
9595
" )\n",
96-
" # SDK (gRPC client helpers used by LocalClient wrapper) must come from the same pin.\n",
97-
" subprocess.run(\n",
98-
" [\n",
99-
" sys.executable,\n",
100-
" \"-m\",\n",
101-
" \"pip\",\n",
102-
" \"install\",\n",
103-
" \"-q\",\n",
104-
" \"git+https://github.com/structured-world/coordinode-python.git@c2ce32064dd7f6495f0998049c0cc2f6f7a5767d#subdirectory=coordinode\",\n",
105-
" ],\n",
106-
" check=True,\n",
107-
" timeout=300,\n",
108-
" )\n",
10996
"\n",
11097
"# coordinode-embedded is pinned to a specific git commit because it requires a Rust\n",
11198
"# build (maturin/pyo3) and the embedded engine must match the Python SDK version.\n",
11299
"# The remaining packages (coordinode, llama-index, etc.) are installed without pins:\n",
113100
"# they are pure Python, release frequently, and pip resolves a compatible version.\n",
101+
"_coordinode_spec = (\n",
102+
" \"git+https://github.com/structured-world/coordinode-python.git@c2ce32064dd7f6495f0998049c0cc2f6f7a5767d#subdirectory=coordinode\"\n",
103+
" if IN_COLAB\n",
104+
" else \"coordinode\"\n",
105+
")\n",
114106
"subprocess.run(\n",
115107
" [\n",
116108
" sys.executable,\n",
117109
" \"-m\",\n",
118110
" \"pip\",\n",
119111
" \"install\",\n",
120112
" \"-q\",\n",
121-
" \"coordinode\",\n",
113+
" _coordinode_spec,\n",
122114
" \"llama-index-graph-stores-coordinode\",\n",
123115
" \"llama-index-core\",\n",
124116
" \"nest_asyncio\",\n",

demo/notebooks/02_langchain_graph_chain.ipynb

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,6 @@
9090
" check=True,\n",
9191
" timeout=600,\n",
9292
" )\n",
93-
" # SDK (gRPC client helpers used by LocalClient wrapper) must come from the same pin.\n",
94-
" subprocess.run(\n",
95-
" [\n",
96-
" sys.executable,\n",
97-
" \"-m\",\n",
98-
" \"pip\",\n",
99-
" \"install\",\n",
100-
" \"-q\",\n",
101-
" \"git+https://github.com/structured-world/coordinode-python.git@c2ce32064dd7f6495f0998049c0cc2f6f7a5767d#subdirectory=coordinode\",\n",
102-
" ],\n",
103-
" check=True,\n",
104-
" timeout=300,\n",
105-
" )\n",
10693
"\n",
10794
"# coordinode-embedded and langchain-coordinode are pinned to a specific git commit:\n",
10895
"# - coordinode-embedded requires a Rust build (maturin/pyo3); the embedded engine\n",
@@ -111,14 +98,19 @@
11198
"# is available; this parameter is not yet released to PyPI.\n",
11299
"# The remaining packages (coordinode, LangChain, etc.) are installed without pins:\n",
113100
"# they are pure Python, release frequently, and pip resolves a compatible version.\n",
101+
"_coordinode_spec = (\n",
102+
" \"git+https://github.com/structured-world/coordinode-python.git@c2ce32064dd7f6495f0998049c0cc2f6f7a5767d#subdirectory=coordinode\"\n",
103+
" if IN_COLAB\n",
104+
" else \"coordinode\"\n",
105+
")\n",
114106
"subprocess.run(\n",
115107
" [\n",
116108
" sys.executable,\n",
117109
" \"-m\",\n",
118110
" \"pip\",\n",
119111
" \"install\",\n",
120112
" \"-q\",\n",
121-
" \"coordinode\",\n",
113+
" _coordinode_spec,\n",
122114
" \"langchain\",\n",
123115
" \"git+https://github.com/structured-world/coordinode-python.git@c2ce32064dd7f6495f0998049c0cc2f6f7a5767d#subdirectory=langchain-coordinode\",\n",
124116
" \"langchain-community\",\n",

0 commit comments

Comments
 (0)