Skip to content

ENH: adopt xoscar 0.9.7 graceful #system_*# fallback - #5228

Merged
OliverBryant merged 3 commits into
xorbitsai:mainfrom
OliverBryant:fix/system-pandas-marker-whitelist
Jul 31, 2026
Merged

OliverBryant merged 3 commits into
xorbitsai:mainfrom
OliverBryant:fix/system-pandas-marker-whitelist

Conversation

@OliverBryant

@OliverBryant OliverBryant commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What do these changes do?

Two related changes for minimal-install (3.0) hosts where numpy/torch/pandas may be absent from the main environment:

  1. Require xoscar>=0.9.7 (pyproject.toml). xoscar 0.9.7 ships ENH: graceful fallback for #system_*# when host package is missing xoscar#195: #system_*# placeholders degrade gracefully when the host environment lacks the package (installed unpinned with a warning instead of raising RuntimeError and failing the model launch), markers are evaluated before placeholder resolution, and host-aligned pins that conflict with other requirements (e.g. a model pinning a newer engine) are dropped on a one-shot retry — including in skip_installed mode.

  2. Add #system_pandas# to the system marker whitelist in filter_virtualenv_packages_by_markers (xinference/core/utils.py). Model specs already use #system_pandas# (7 occurrences in the audio model spec), but the whitelist only covered the torch-family and numpy placeholders; the generic marker path it fell through to happens to produce an equivalent result today, but relies on incidental behavior. Adds a regression test.

Check code requirements

  • tests added / passed (xinference/core/tests/test_utils.py)
  • passes black --check / isort --check-only

@XprobeBot XprobeBot added the enhancement New feature or request label Jul 23, 2026
@XprobeBot XprobeBot added this to the v3.x milestone Jul 23, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for #system_pandas# as a system package placeholder in filter_virtualenv_packages_by_markers within xinference/core/utils.py. It also includes a corresponding unit test in xinference/core/tests/test_utils.py to verify that #system_pandas# is correctly handled when filtering virtual environment packages by markers. There are no review comments, and the changes look correct and well-tested, so I have no additional feedback to provide.

@OliverBryant
OliverBryant force-pushed the fix/system-pandas-marker-whitelist branch from a812666 to 2c61778 Compare July 28, 2026 04:29
@OliverBryant OliverBryant changed the title ENH: add #system_pandas# to virtualenv system marker whitelist ENH: adopt xoscar 0.9.7 graceful #system_*# fallback Jul 28, 2026
Model specs (e.g. audio) already use #system_pandas#, but
filter_virtualenv_packages_by_markers only whitelisted the torch-family
and numpy placeholders. Add pandas so all placeholders used in model
specs are handled consistently.
xoscar 0.9.7 ships xorbitsai/xoscar#195: #system_*# placeholders now
degrade gracefully when the host environment lacks the package
(minimal-install hosts), markers are evaluated before placeholder
resolution, and conflicting host-aligned pins are dropped on retry.
Require it so model launch no longer hard-fails on hosts without
numpy/torch/pandas.
@OliverBryant
OliverBryant force-pushed the fix/system-pandas-marker-whitelist branch from f5b195f to fcaadb9 Compare July 30, 2026 06:21
Comment thread pyproject.toml
Dockerfile.cpu installs xoscar from requirements_cpu-base.txt and then
installs Xinference with --no-deps, so the pyproject.toml lower bound is
not enforced for the CPU image.
@OliverBryant
OliverBryant merged commit 41c4d2b into xorbitsai:main Jul 31, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants