Remove dead misplaced shebang from convert_release_config_to_training.py#97
Open
lonexreb wants to merge 1 commit intoNVlabs:mainfrom
Open
Remove dead misplaced shebang from convert_release_config_to_training.py#97lonexreb wants to merge 1 commit intoNVlabs:mainfrom
lonexreb wants to merge 1 commit intoNVlabs:mainfrom
Conversation
scripts/convert_release_config_to_training.py has a shebang on line 16, *after* the SPDX header. A shebang only works as the very first line of a file -- on line 16 it's just an inert comment that the kernel never sees, so even chmod +x'ing the file would not make `./script.py` work as advertised. Two clean fixes existed: hoist the shebang to line 1 (and reorder the SPDX block beneath it), or delete it. The other three scripts in scripts/ have no shebang at all, the file is shipped without the executable bit, and the script's own usage block invokes it via `python scripts/convert_release_config_to_training.py ...`. Drop the shebang to match the dir convention and remove the misleading line. Pure cleanup. No runtime behavior change (the file is still invoked as a python module, exactly as documented). Verified: `grep -n '^#!' scripts/*.py` now returns nothing. Signed-off-by: lonexreb <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
scripts/convert_release_config_to_training.pyhas a shebang on line 16, after the SPDX header:A shebang only works as the very first line of a file. On line 16 it's just an inert comment the kernel never sees, so even
chmod +x+./script.pywould not work as the line implies.Fix
Two reasonable options existed:
I chose (2) because:
scripts/(download_pai.py,curate_pai_samples.py,convert_cosmos_rl_checkpoint.py) have no shebang at all — verified bygrep -n '^#!' scripts/*.py.-rw-r--r--).python scripts/convert_release_config_to_training.py ..., never./scripts/....Dropping the line matches the dir convention, removes a misleading marker, and keeps the SPDX header at the canonical position (line 1).
Verification
After this PR,
grep -n '^#!' scripts/*.pyreturns nothing across the entire scripts directory. The script continues to be invoked exactly as documented.