Skip to content

Prepend "uv run" to every "mlpstorage" invocation#308

Merged
russfellows merged 7 commits intomainfrom
uv-run-reqd
Apr 6, 2026
Merged

Prepend "uv run" to every "mlpstorage" invocation#308
russfellows merged 7 commits intomainfrom
uv-run-reqd

Conversation

@FileSystemGuy
Copy link
Copy Markdown
Contributor

Insert a "mlpstorage" shell script to prepend "uv run" to every invocation, ensuring that the virtual environment with all the locked-down versions of libraries and tools is instantiated and used every single time.

@FileSystemGuy FileSystemGuy requested review from a team April 3, 2026 15:26
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@FileSystemGuy
Copy link
Copy Markdown
Contributor Author

Resolve #293

russfellows
russfellows previously approved these changes Apr 3, 2026
Copy link
Copy Markdown
Contributor

@russfellows russfellows left a comment

Choose a reason for hiding this comment

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

This makes sense to me. One possible alternative is a new shell script, which simply does a "uv run xxx.py" or whatever. This change is fine, but if people have heartburn that may be an easy solution?

@FileSystemGuy FileSystemGuy added the DLIO or mlpstorage related to code in mlpstorage or dlio label Apr 3, 2026
@idevasena
Copy link
Copy Markdown
Contributor

I see following issue with VERSION METADATA Mismatch.
The __init__.py calls _pkg_version("mlpstorage_py") but the project name in pyproject.toml is "mlpstorage". This will cause VERSION = "unknown" at runtime because importlib.metadata looks up by distribution name.

Can be fixed as follows:

Either:
Change mlpstorage_py/init.py to _pkg_version("mlpstorage"), or
Change pyproject.toml name to "mlpstorage_py"

Before:

smrc@dskbd029:~/Storage_Repo_Tests/storage_308$ uv run python3 -c "import mlpstorage_py; print('Version:', mlpstorage_py.VERSION)"
Using CPython 3.12.3 interpreter at: /usr/bin/python3.12
Creating virtual environment at: .venv
      Built mlpstorage @ file:///home/smrc/Storage_Repo_Tests/storage_308
Installed 9 packages in 28ms
Version: unknown
smrc@dskbd029:~/Storage_Repo_Tests/storage_308$ ./mlpstorage --version
mlpstorage unknown

After above change:

smrc@dskbd029:~/Storage_Repo_Tests/storage_308$ uv run python3 -c "import mlpstorage_py; print('Version:', mlpstorage_py.VERSION)"
Version: 2.0.0b1
smrc@dskbd029:~/Storage_Repo_Tests/storage_308$ ./mlpstorage --version
mlpstorage 2.0.0b1

Copy link
Copy Markdown
Contributor

@idevasena idevasena left a comment

Choose a reason for hiding this comment

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

Overall following updates to be made:

  1. pyproject.toml Line 49: [project.scripts]mlpstorage.main:main should be mlpstorage_py.main:main
  2. pyproject.toml Line 46: [tool.setuptools.package-data] key "mlpstorage" should be "mlpstorage_py"
  3. mlpstorage_py/__init__.py: _pkg_version("mlpstorage_py") mismatches distribution name "mlpstorage"
  4. mlpstorage_py/rules/verifier.py line 73: String check "mlpstorage.benchmarks." not updated — breaks all benchmark runs.
  5. pyproject.toml line 61: [tool.coverage.run] source still "mlpstorage"
  6. mlpstorage_py/main.py, mlpstorage_py/validation_helpers.py: User-facing messages, suggestions and print logs say mlpstorage_py instead of mlpstorage`.

Comment thread mlpstorage_py/validation_helpers.py Outdated
Comment thread mlpstorage_py/rules/verifier.py Outdated
Updated project dependencies and script entry point to reflect the directory rename from mlpstorage to mlpstorage_py.  Also make DLIO a required dependency rather than an optional one.
Missed a conversion from "mlpstorage." to "mlpstorage_py."
Missed a conversion from "mlpstorage." to "mlpstorage_py."
Accidentally convert some user-facing string to "mlpstorage_py", so undo that.
Accidentally convert some user-facing string to "mlpstorage_py", so undo that.
@FileSystemGuy
Copy link
Copy Markdown
Contributor Author

Thank you very much for such a detailed and thorough review!

russfellows
russfellows previously approved these changes Apr 4, 2026
Copy link
Copy Markdown
Contributor

@russfellows russfellows left a comment

Choose a reason for hiding this comment

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

Love the hammer.

idevasena
idevasena previously approved these changes Apr 5, 2026
@idevasena idevasena mentioned this pull request Apr 6, 2026
pgmpablo157321
pgmpablo157321 previously approved these changes Apr 6, 2026
@FileSystemGuy
Copy link
Copy Markdown
Contributor Author

Resolves #314

@russfellows russfellows merged commit 87fe32f into main Apr 6, 2026
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2026
@russfellows russfellows deleted the uv-run-reqd branch April 7, 2026 00:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

DLIO or mlpstorage related to code in mlpstorage or dlio

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants