Skip to content

fix --rng-deterministic argparse bool parsing#100

Open
tempoo04 wants to merge 1 commit intosalesforce:mainfrom
tempoo04:fix/argparse-bool-rng-deterministic
Open

fix --rng-deterministic argparse bool parsing#100
tempoo04 wants to merge 1 commit intosalesforce:mainfrom
tempoo04:fix/argparse-bool-rng-deterministic

Conversation

@tempoo04
Copy link
Copy Markdown

Summary

Fix silent bug in codegen1/jaxformer/hf/sample.py:195 where --rng-deterministic flag never accepts False.

Problem

type=bool in argparse calls bool(str). Any non-empty string is True, including "False". So --rng-deterministic False silently keeps determinism on. Users cannot disable deterministic cuDNN via CLI.

Fix

Switch to argparse.BooleanOptionalAction:

@salesforce-cla
Copy link
Copy Markdown

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Turgut <t***@g***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant