Skip to content

Conversation

@navinag1989
Copy link
Collaborator

post upgrade hook commit to migrate to runtime mode

navin-agrawal and others added 4 commits October 30, 2025 17:57
…cifically: (#500) (#8)

- `TypeError: Cannot create a consistent method resolution order (MRO) for bases ABC, Generic` in Phoenix library
- `ModuleNotFoundError: No module named 'engine'` during runtime

The root cause was that the build scripts used `pip install .` which:
1. Only reads `pyproject.toml` dependency ranges
2. Installs **latest compatible versions** of dependencies
3. Ignores the `uv.lock` file with tested, pinned versions
4. Creates version mismatches between dev and production environments

Modified both `cdsw-build.sh` files to use a two-step installation process:

```bash
uv export --frozen --no-hashes > /tmp/requirements.txt
pip install -r /tmp/requirements.txt
rm /tmp/requirements.txt
```
- Exports exact package versions from `uv.lock`
- Installs into system Python (not venv)
- Prevents version conflicts

```bash
pip install --no-deps .
```
- Installs the `engine` module as a proper Python package
- `--no-deps` prevents reinstalling dependencies (already done in Step 1)
- Makes `import engine` work from any location

✅ **Reproducible builds** - Same dependency versions in dev and production
✅ **No MRO errors** - Phoenix and other libraries use tested compatible versions
✅ **Proper module installation** - `engine` package installed in site-packages
✅ **Maintains uv.lock** - Lock file is now actually used during deployment

- `/studio/workflow_engine/cdsw-build.sh` - Build script for model root dir enabled
- `/cdsw-build.sh` - Build script for model root dir disabled (legacy)

Verified that `uv.lock` is:
1. ✅ Copied to deployment directory (already working)
2. ✅ Used during package installation (fixed by this change)
3. ✅ Results in successful model deployment without import errors

Co-authored-by: Suryakant03 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants