Repository navigation
Studio on Windows: recommend Repair when an existing home is older than the managed torch / xFormers #19870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Studio on Windows: recommend Repair when an existing home is older than the managed torch / xFormers #19870
Changes from 1 commit
c49e733
7ceae54
8e2ada6
fb89fd7
df67a70
1aceba7
03c5e73
5a046a6
c55eba0
24cbe58
339128d
84ee157
5e4e149
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…ects in the mirror gate install.ps1's Test-MirrorConfigured walks up from UV_PROJECT (resolved against UV_WORKING_DIR) to the first uv.toml or [tool.uv] pyproject.toml; the gate now reads the same file. [skip ci]
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,7 +102,8 @@ def _index_override_leaf(environ = os.environ) -> Optional[str]: | |
| def _uv_config_files(environ) -> list[str]: | ||
| """The uv config files install.ps1's Test-MirrorConfigured reads, in its precedence: UV_CONFIG_FILE alone | ||
| (even with UV_NO_CONFIG), else none under UV_NO_CONFIG, else the user file plus the system one unless | ||
| UV_NO_SYSTEM_CONFIG. Its project discovery walks the installer's working directory, unknown here.""" | ||
| UV_NO_SYSTEM_CONFIG, plus the project UV_PROJECT names. Without UV_PROJECT the installer walks its | ||
| own working directory, unknown here.""" | ||
| if environ.get("UV_CONFIG_FILE"): | ||
| return [environ["UV_CONFIG_FILE"]] | ||
| if str(environ.get("UV_NO_CONFIG", "")).strip().lower() in _UV_TRUE: | ||
|
|
@@ -115,6 +116,24 @@ def _uv_config_files(environ) -> list[str]: | |
| and str(environ.get("UV_NO_SYSTEM_CONFIG", "")).strip().lower() not in _UV_TRUE | ||
| ): | ||
| files.append(os.path.join(environ["ProgramData"], "uv", "uv.toml")) | ||
| # An explicit UV_PROJECT names the project the installer's discovery walks up from. | ||
| if environ.get("UV_PROJECT"): | ||
| base = environ.get("UV_WORKING_DIR") or environ.get("UV_WORKING_DIRECTORY") or os.getcwd() | ||
| directory = os.path.abspath(os.path.join(base, environ["UV_PROJECT"])) | ||
| while directory: | ||
| if os.path.isfile(os.path.join(directory, "uv.toml")): | ||
| files.append(os.path.join(directory, "uv.toml")) | ||
| break | ||
| pyproject = os.path.join(directory, "pyproject.toml") | ||
| try: | ||
| with open(pyproject, encoding = "utf-8", errors = "replace") as handle: | ||
| if re.search(r"^\s*\[+tool\.uv(\.|\])", handle.read(), re.M): | ||
| files.append(pyproject) | ||
| break | ||
| except OSError: | ||
| pass | ||
| parent = os.path.dirname(directory) | ||
| directory = parent if parent != directory else "" | ||
| return files | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On an otherwise eligible Windows RTX 50-series host, setting Useful? React with 👍 / 👎.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 24cbe58 (my earlier reply named the wrong commit; the change had not been pushed yet). With |
||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On an otherwise eligible Windows RTX 50-series installation, setting
UV_WORKING_DIR(orUV_WORKING_DIRECTORY) to an absolute directory containing a mirror-configureduv.toml, without settingUV_PROJECT, still produces the Repair recommendation. This condition skips project discovery entirely, whereasinstall.ps1'sTest-MirrorConfiguredstarts discovery from the working-directory override even withoutUV_PROJECT(install.ps1:4273–4287). The installer consequently rejects the managed 2.13 route and Repair retains the older torch window, leaving the recommendation unresolved. Start discovery from an explicit working-directory override as well as an explicit project.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 84ee157: discovery now starts from UV_WORKING_DIR / UV_WORKING_DIRECTORY even without UV_PROJECT, and UV_PROJECT and UV_CONFIG_FILE resolve against it, matching Test-MirrorConfigured. New test covers both spellings and fails on 339128d.