Skip to content

Expand tests to cover supported dtypes#29

Merged
jshin1394 merged 1 commit intogoogle:mainfrom
jeffcarp:add-dtype-tests
Mar 10, 2025
Merged

Expand tests to cover supported dtypes#29
jshin1394 merged 1 commit intogoogle:mainfrom
jeffcarp:add-dtype-tests

Conversation

@jeffcarp
Copy link
Collaborator

@jeffcarp jeffcarp commented Mar 7, 2025

Includes float32, float16, and bfloat16

Fixes #22

@jeffcarp jeffcarp requested a review from jshin1394 March 7, 2025 18:05
).astype(np.float32)
OUTPUT_PREDS = np.random.uniform(size=(BATCHES, BATCH_SIZE)).astype(np.float32)
OUTPUT_PREDS = np.random.uniform(size=(BATCHES, BATCH_SIZE))
OUTPUT_PREDS_F16 = OUTPUT_PREDS.astype(np.float16)
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we use jnp as much as we can? WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

SG, done. I think they are effectively the same in the end (I think JAX auto-promotes any np dtypes and arrays to jnp), but good to have consistency.

@jshin1394
Copy link
Collaborator

metrics_test.py was modified heavily in order to migrate from sklearn to keras. Do you want to sync your workspace and add the new parameters?

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@jeffcarp
Copy link
Collaborator Author

metrics_test.py was modified heavily in order to migrate from sklearn to keras. Do you want to sync your workspace and add the new parameters?

I forgot to sync my fork 🤡 - redid the PR

@jeffcarp jeffcarp changed the title Expand tests to cover supported types Expand tests to cover supported dtypes Mar 10, 2025
@jshin1394 jshin1394 merged commit 83f194f into google:main Mar 10, 2025
5 checks passed
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.

Parameterize tests to cover all supported dtypes

2 participants