8000 Fix python typing issue by tushuhei · Pull Request #845 · google/budoux · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix python typing issue #845

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

Merged
merged 1 commit into from
Dec 9, 2024
Merged

Fix python typing issue #845

merged 1 commit into from
Dec 9, 2024

Conversation

tushuhei
Copy link
Member
@tushuhei tushuhei commented Dec 9, 2024

The latest mypy and jax combination yields the typing error as below. This fixes the issue by making it sure that the epsilon is a float.

scripts/train.py:26: error: Incompatible types in assignment (expression has
type "floating[Any]", variable has type "float")  [assignment]
    EPS: float = jnp.finfo(float).eps
                 ^~~~~~~~~~~~~~~~~~~~
scripts/finetune.py:30: error: Incompatible types in assignment (expression has
type "floating[Any]", variable has type "float")  [assignment]
    EPSILON: float = jnp.finfo(float).eps
                     ^~~~~~~~~~~~~~~~~~~~
Found 2 errors in 2 files (checked 23 source files)

Copy link
Collaborator
@kojiishi kojiishi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@tushuhei tushuhei merged commit 73175af into main Dec 9, 2024
44 checks passed
@tushuhei tushuhei deleted the type-nit branch December 27, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0