Skip to content
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

Add option to force dimensionless constants #310

Merged
merged 2 commits into from
Apr 28, 2024

Conversation

MilesCranmer
Copy link
Owner

Feature request from the forums: MilesCranmer/PySR#606

Seems like a good idea to have this, so this PR enables such an option under dimensionless_constants_only, which allows the user to disable the "wildcard" unit behavior.

Copy link
Contributor

Benchmark Results

master 571f85b... master/571f85bd6df456...
search/multithreading 16.2 ± 0.39 s 16.9 ± 0.23 s 0.957
search/serial 32.4 ± 0.045 s 32.3 ± 0.012 s 1
utils/best_of_sample 0.761 ± 0.22 μs 0.742 ± 0.23 μs 1.03
utils/check_constraints_x10 11.3 ± 2.9 μs 11.6 ± 2.9 μs 0.979
utils/compute_complexity_x10/Float64 2.19 ± 0.12 μs 2.21 ± 0.11 μs 0.991
utils/compute_complexity_x10/Int64 2.18 ± 0.11 μs 2.19 ± 0.11 μs 0.995
utils/compute_complexity_x10/nothing 1.46 ± 0.09 μs 1.44 ± 0.091 μs 1.01
utils/optimize_constants_x10 29.6 ± 6.7 ms 30.5 ± 6.7 ms 0.97
time_to_load 0.87 ± 0.0021 s 0.877 ± 0.0098 s 0.991

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

@MilesCranmer MilesCranmer merged commit bc7c02b into master Apr 28, 2024
23 checks passed
@MilesCranmer MilesCranmer deleted the dimensionless-constants branch April 28, 2024 04:27
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.

1 participant