-
Notifications
You must be signed in to change notification settings - Fork 34
PyPi Package Deployment + Remove Banshee Dept #154
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
base: devel
Are you sure you want to change the base?
PyPi Package Deployment + Remove Banshee Dept #154
Conversation
…y into pr/package-deployment
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughSwitches Banshee from source builds to prebuilt downloads, removes Rust toolchain bits from images and toolchain, adds a GitHub Actions Publish workflow for PyPI/TestPyPI, updates Makefile/CMake to use BANSHEE_INSTALL_DIR, adjusts container Dockerfiles, relaxes an ONNX dependency, and adds releasing docs and a constant-tensor coercion before ONNX export. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 5
🤖 Fix all issues with AI agents
In @.github/workflows/_select-env.yml:
- Line 37: Replace the fallback container image value assigned to IMAGE
(currently set to "ghcr.io/victor-jung/deeploy:package-deployment") with the
org-owned registry image "ghcr.io/pulp-platform/deeploy:devel" so CI does not
depend on a personal registry; update the IMAGE assignment accordingly wherever
that fallback is defined.
In `@Deeploy/DeeployTypes.py`:
- Around line 3106-3109: The current loop in DeeployTypes.py unconditionally
casts every gs.Constant's tensor.values to float32 (using tensor.values.astype),
which will corrupt integer/bool/quantized constants; change the logic that
builds or iterates constTensors (from self.graph.tensors().values() and
gs.Constant) to only perform the cast when the constant's dtype is already a
floating type (use numpy's type check, e.g., np.issubdtype(tensor.values.dtype,
np.floating)) and skip casting for integer/bool/quantized tensors so only true
float tensors are converted to np.float32 before export.
In `@docs/releasing.md`:
- Line 17: Clarify that tags are not created automatically on merge to main;
update the sentence about committing/merging to state who must create the
release tag and how (e.g., manually with git tag <version> && git push origin
<tag> or via your release tooling), and note that the release workflow is
triggered by tags matching the pattern "v*" so the tag must be created/pushed to
trigger the workflow; reference the branch name "main" and the tag pattern "v*"
in the new line for clarity.
In `@Makefile`:
- Around line 55-70: The Darwin branch currently hardcodes TARGET :=
aarch64-apple-darwin which mistargets Intel Macs; update the conditional logic
that uses OS and ARCH to check ARCH when OS is Darwin (similar to the Linux
block) and set TARGET to x86_64-apple-darwin for ARCH == x86_64 and
aarch64-apple-darwin for ARCH == aarch64, otherwise emit an unsupported
architecture error; ensure you modify the Makefile's OS/ARCH conditional section
and preserve the existing Linux checks (TARGET, OS, ARCH symbols) while removing
any unfounded special-casing about arm64 on Linux.
- Around line 520-524: The Makefile rule that populates ${BANSHEE_INSTALL_DIR}
currently downloads prebuilt banshee via the curl/tar pipeline using the
$(TARGET) variable without any integrity checks; update this rule to verify the
downloaded artifact before extracting by either fetching a corresponding
checksum or signature and validating it (e.g., download a .sha256 or .asc
alongside the banshee-0.5.0-$(TARGET).tar.gz and run sha256sum -c or gpg
--verify), or if no machine-readable checksum exists, pin and document an
expected SHA256 value and compare it after download; ensure the build fails on
mismatch and reference the same symbols (${BANSHEE_INSTALL_DIR}, TARGET, the
curl download of banshee-0.5.0-$(TARGET).tar.gz) so the change is applied to the
right Makefile target.
🧹 Nitpick comments (3)
pyproject.toml (1)
6-7: Consider adding an upper bound for onnx-graphsurgeon.Relaxing to
>=0.5.8may allow future breaking changes. If you only support a tested major/minor series, add an upper bound and verify compatibility with the latest allowed version.📌 Suggested constraint
-'onnx-graphsurgeon>=0.5.8', +'onnx-graphsurgeon>=0.5.8,<0.6',Also applies to: 25-25
cmake/simulation.cmake (1)
45-52: Validate the banshee executable path.Line 48 sets
BANSHEE_EXECUTABLEbut doesn’t verify it exists. A quick existence check gives a clearer error when the env var is mis-set.✅ Suggested validation
set(BANSHEE_EXECUTABLE "$ENV{BANSHEE_INSTALL_DIR}/banshee") +if(NOT EXISTS "${BANSHEE_EXECUTABLE}") + message(FATAL_ERROR "Banshee executable not found at ${BANSHEE_EXECUTABLE}") +endif()Container/Dockerfile.deeploy (1)
17-17: Use a directory in PATH (or drop this line).
/app/benderlooks like a binary path, not a directory. PATH entries should be directories, otherwise the entry is a no-op. Consider using/app(if the binary resides there) or removing this line since you copybenderinto/binlater.
| IMAGE="ghcr.io/pulp-platform/deeploy:main" | ||
| else | ||
| IMAGE="ghcr.io/pulp-platform/deeploy:devel" | ||
| IMAGE="ghcr.io/victor-jung/deeploy:package-deployment" |
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.
🧩 Analysis chain
🏁 Script executed:
# First, let's examine the workflow file structure and context around line 37
cat -n .github/workflows/_select-env.yml | head -50Repository: pulp-platform/Deeploy
Length of output: 1858
🏁 Script executed:
# Check git history to see what the previous value was
git log --oneline -p .github/workflows/_select-env.yml | head -200Repository: pulp-platform/Deeploy
Length of output: 1781
🏁 Script executed:
# Search for other usages of these registry images in the codebase
rg "ghcr.io/(victor-jung|pulp-platform)" --max-count=20Repository: pulp-platform/Deeploy
Length of output: 667
🏁 Script executed:
# Search for any comments or documentation about the personal image choice
rg "victor-jung|package-deployment" --context=5Repository: pulp-platform/Deeploy
Length of output: 269
🏁 Script executed:
# Check what tags are available in the registry or documented
rg "deeploy:" .github/ -t yaml | head -20Repository: pulp-platform/Deeploy
Length of output: 1958
🏁 Script executed:
# Check which workflows call this _select-env.yml
rg "select-env" .github/workflows/*.ymlRepository: pulp-platform/Deeploy
Length of output: 11056
🏁 Script executed:
# Look more closely at the logic flow - see how docker_image_deeploy input is used
rg -A 3 "docker_image_deeploy" .github/workflows/ | head -40Repository: pulp-platform/Deeploy
Length of output: 2603
Default image should use org-owned registry.
Line 37 uses ghcr.io/victor-jung/deeploy:package-deployment as a fallback, creating a dependency on a personal registry. This can break CI for forks or future runs if the image becomes inaccessible. Change to the org-owned image ghcr.io/pulp-platform/deeploy:devel, which is already used as the default in all calling workflows.
🔁 Suggested fix
- IMAGE="ghcr.io/victor-jung/deeploy:package-deployment"
+ IMAGE="ghcr.io/pulp-platform/deeploy:devel"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| IMAGE="ghcr.io/victor-jung/deeploy:package-deployment" | |
| IMAGE="ghcr.io/pulp-platform/deeploy:devel" |
🤖 Prompt for AI Agents
In @.github/workflows/_select-env.yml at line 37, Replace the fallback container
image value assigned to IMAGE (currently set to
"ghcr.io/victor-jung/deeploy:package-deployment") with the org-owned registry
image "ghcr.io/pulp-platform/deeploy:devel" so CI does not depend on a personal
registry; update the IMAGE assignment accordingly wherever that fallback is
defined.
Added
publish.ymlaction to build a branch and push it to PyPi. The action is automatically triggered when a tag with the "v*" format is emitted.Makefilenow pulls that release depending on the platform._export_graphassigns their export type to the tensors before export.TODO: Update readme with new pyindex
TODO: Update changelogs
Changed
PULP-Deeploytpdeeploy-pulp.Fixed
install.mdto remove rust mention and fix test command.README.mdto remove reference to NVIDIA's PyPi index.PR Merge Checklist
develcommit and pointing todevel.CHANGELOG.mdfile has been updated.