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

Config + DebugMode rename (breaking) #262

Merged
merged 5 commits into from
Sep 25, 2024
Merged

Config + DebugMode rename (breaking) #262

merged 5 commits into from
Sep 25, 2024

Conversation

willtebbutt
Copy link
Member

@willtebbutt willtebbutt commented Sep 25, 2024

Addresses #215 and further's the renaming process.

@yebai are you happy with just calling the object Config?

@yebai
Copy link
Contributor

yebai commented Sep 25, 2024

The name is okay to me, but that means we should probably not export it because it is too generic.

What is the plan for the default execution mode (i.e. true/false for debugging mode)? If the default is true, it feels too lengthy to type AutoMooncake(AutoMooncake.Config(debug_mode=false))...

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/MooncakeLogDensityProblemsADExt.jl 0.00% 2 Missing ⚠️
src/interpreter/s2s_reverse_mode_ad.jl 96.42% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/Mooncake.jl 100.00% <ø> (ø)
src/config.jl 100.00% <100.00%> (ø)
src/debug_mode.jl 100.00% <100.00%> (ø)
src/interface.jl 91.42% <100.00%> (ø)
src/test_utils.jl 91.98% <100.00%> (ø)
src/interpreter/s2s_reverse_mode_ad.jl 93.16% <96.42%> (ø)
ext/MooncakeLogDensityProblemsADExt.jl 0.00% <0.00%> (ø)

@willtebbutt
Copy link
Member Author

The name is okay to me, but that means we should probably not export it because it is too generic.

Agreed -- I won't export it.

What is the plan for the default execution mode (i.e. true/false for debugging mode)?

The default is debug mode off, so people will just have to write

AutoMooncake(; config=Mooncake.Config())

to get the default fast mode.

Copy link
Contributor

Performance Ratio:
Ratio of time to compute gradient and time to compute function.
Warning: results are very approximate! See here for more context.

┌────────────────────────────┬──────────┬─────────┬─────────────┬─────────┐
│                      Label │ Mooncake │  Zygote │ ReverseDiff │  Enzyme │
│                     String │   String │  String │      String │  String │
├────────────────────────────┼──────────┼─────────┼─────────────┼─────────┤
│                   sum_1000 │    111.0 │     1.0 │        5.41 │     1.8 │
│                  _sum_1000 │     7.89 │  1390.0 │        43.1 │   0.106 │
│               sum_sin_1000 │     2.45 │    1.58 │        10.5 │    1.01 │
│              _sum_sin_1000 │     2.92 │   296.0 │        15.9 │    1.39 │
│                   kron_sum │     58.2 │    9.65 │       190.0 │    11.3 │
│              kron_view_sum │     87.4 │    10.5 │       210.0 │    7.47 │
│      naive_map_sin_cos_exp │     3.33 │ missing │        8.94 │     2.8 │
│            map_sin_cos_exp │      4.9 │     1.7 │        7.63 │    3.42 │
│      broadcast_sin_cos_exp │     4.24 │    2.55 │        1.67 │    2.84 │
│                 simple_mlp │     5.28 │    3.09 │        7.54 │    3.14 │
│                     gp_lml │     5.62 │    2.18 │     missing │ missing │
│ turing_broadcast_benchmark │      7.1 │ missing │        34.2 │ missing │
│         large_single_block │      3.9 │  4130.0 │        30.4 │    2.24 │
└────────────────────────────┴──────────┴─────────┴─────────────┴─────────┘

@willtebbutt
Copy link
Member Author

I'm going to hold off merging this until the ADType PR looks good to go.

@willtebbutt
Copy link
Member Author

ADTypes PR is merged, so I'm going to release this.

@willtebbutt willtebbutt merged commit db3b696 into main Sep 25, 2024
16 of 17 checks passed
@willtebbutt willtebbutt deleted the wct/config branch September 25, 2024 11:50
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