Skip to content

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

Open
FileSystemGuy wants to merge 6 commits intomainfrom
uv-run-reqd
Open

Prepend "uv run" to every "mlpstorage" invocation#308
FileSystemGuy wants to merge 6 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`.

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!

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DLIO or mlpstorage related to code in mlpstorage or dlio

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants