Fix --help crash, remove debug print, and recommend isolated install#36
Open
Zelray wants to merge 2 commits into
Open
Fix --help crash, remove debug print, and recommend isolated install#36Zelray wants to merge 2 commits into
Zelray wants to merge 2 commits into
Conversation
Escape the percent in the --fast help string (50% -> 50%%) so argparse stops treating it as a format specifier and dumping the raw argument dict on 'commonforms --help'. Also remove a stray debug print that echoed args.confidence to stdout on every invocation.
Lead the Installation section with uv tool install / pipx, which create a dedicated env and expose only the commonforms command. The dependency set (transformers, torch, rfdetr, ultralytics) is large and pins recent versions, so a plain pip install into a shared env can upgrade numpy/pillow/transformers in place and break other tooling. Keep uv pip / pip documented for in-project library use, with a caution about the active environment.
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.
First off — thank you for building this. I switched from a $99/month SaaS to
commonformsand it does the same job for free, so this PR is a small thank-you in the form of three tiny fixes I hit while getting set up.What
commonforms --helpcrash — an unescaped%in the--fastargparse help string (...50% speedup...) made argparse treat it as a format specifier and dump the raw argument dict into the terminal instead of showing help. Escaped it to50%%so--helpis just help again.print()—print(f"**{args.confidence=}")in__main__.pyechoed**args.confidence=0.3to stdout on every run. Quietly retired.uv tool install commonforms/pipx install commonformsso new users don't install into their active (e.g. condabase) environment by accident.Why
--helpdict-dump was a surprise easter egg, but probably not the one you intended — it's the first thing a curious new user runs.pip install'd this straight into my condabase. Because the dependency set is large and pins recent majors (transformers,pillow,torch,rfdetr,ultralytics), it upgraded shared packages in place and disturbed some unrelated tooling. An isolated-install nudge up top would have saved me, and likely the next person too.All three are small and self-contained — happy to split them into separate PRs if you'd prefer to review them independently.
Thanks again for putting this out there for free. It genuinely replaced a paid tool for me, and it was a pleasure to give a little back.