Hi, your colab does not work
https://colab.research.google.com/github/DeepFoldProtein/patchr/blob/main/colab_server.ipynb
chatgpt corrected your code, but I still can not connect via your GUI on M1 macos 12.5 (API: Error)
I can share the fix with you so you can compare. The problem was:
PATCHR_Protenix_fixed_Colab_v3_EN.ipynb
"The main issue was a module-name conflict inside PATCHR: both server.py and a server/ package exist, so patchr serve imported the wrong module and could not find the FastAPI app. After fixing the import explicitly, the server started correctly.
The second issue was that Protenix takes a long time to initialize on the first run because it compiles CUDA extensions and downloads model data and checkpoints. The original timeout was too short, so it looked like the model had failed even though it was still loading. After fixing the import and extending the startup wait time, the Colab server works correctly."
Starting PATCHR server (model=protenix)...
Model data is pre-cached — startup should be fast.
[server] Starting PATCHR server on 0.0.0.0:31212
[server] Model: protenix
[server] Work dir: /content/patchr/patchr/patchr_jobs
[server] Device: 0
[server] API docs: http://0.0.0.0:31212/docs
[server] Traceback (most recent call last):
[server] File "/usr/local/bin/patchr", line 8, in
[server] sys.exit(cli())
[server] ^^^^^
[server] File "/usr/local/lib/python3.12/dist-packages/rich_click/rich_command.py", line 402, in call
[server] return super().call(*args, **kwargs)
[server] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[server] File "/usr/local/lib/python3.12/dist-packages/click/core.py", line 1569, in call
[server] return self.main(*args, **kwargs)
[server] ^^^^^^^^^^^^^^^^^^^^^^^^^^
[server] File "/usr/local/lib/python3.12/dist-packages/rich_click/rich_command.py", line 216, in main
[server] rv = self.invoke(ctx)
[server] ^^^^^^^^^^^^^^^^
[server] File "/usr/local/lib/python3.12/dist-packages/click/core.py", line 1970, in invoke
[server] return _process_result(sub_ctx.command.invoke(sub_ctx))
[server] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[server] File "/usr/local/lib/python3.12/dist-packages/click/core.py", line 1353, in invoke
[server] return ctx.invoke(self.callback, **ctx.params)
[server] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[server] File "/usr/local/lib/python3.12/dist-packages/click/core.py", line 907, in invoke
[server] return callback(*args, **kwargs)
[server] ^^^^^^^^^^^^^^^^^^^^^^^^^
[server] File "/content/patchr/patchr/src/boltz/patchr_cli.py", line 1063, in serve
[server] from server import app # noqa: E402
[server] ^^^^^^^^^^^^^^^^^^^^^^
[server] ImportError: cannot import name 'app' from 'server' (/content/patchr/patchr/server/init.py)
ERROR: Server process exited with code 1
Cannot start tunnel — server is not running. --- ---------------------------------------------------------------------------
ConnectionRefusedError Traceback (most recent call last)
/usr/local/lib/python3.12/dist-packages/urllib3/connection.py in _new_conn(self)
197 try:
--> 198 sock = connection.create_connection(
199 (self._dns_host, self.port),
Hi, your colab does not work
https://colab.research.google.com/github/DeepFoldProtein/patchr/blob/main/colab_server.ipynb
chatgpt corrected your code, but I still can not connect via your GUI on M1 macos 12.5 (API: Error)
I can share the fix with you so you can compare. The problem was:
PATCHR_Protenix_fixed_Colab_v3_EN.ipynb
"The main issue was a module-name conflict inside PATCHR: both server.py and a server/ package exist, so patchr serve imported the wrong module and could not find the FastAPI app. After fixing the import explicitly, the server started correctly.
The second issue was that Protenix takes a long time to initialize on the first run because it compiles CUDA extensions and downloads model data and checkpoints. The original timeout was too short, so it looked like the model had failed even though it was still loading. After fixing the import and extending the startup wait time, the Colab server works correctly."