-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor: Enforce DRY/SOLID in Math Explorer #360
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
base: main
Are you sure you want to change the base?
Conversation
- Clinical Trials: Replace unwrap with expect in design.rs - ODE/Epidemiology: Add impl_vector_ops macro to reduce boilerplate - AI/Climate: Introduce ActivationFunction trait and generics for models - Clean up duplicated logic and enforce type safety Co-authored-by: fderuiter <127706008+fderuiter@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Run cargo fmt -- --check impl<A: ActivationFunction> DecoderGeneric {
impl<A: ActivationFunction + Clone> AutoencoderGeneric {
} Error: Process completed with exit code 1. |
I have run |
- Clinical Trials: Replace unwrap with expect in design.rs - ODE/Epidemiology: Add impl_vector_ops macro to reduce boilerplate - AI/Climate: Introduce ActivationFunction trait and generics for models - Clean up duplicated logic and enforce type safety Co-authored-by: fderuiter <127706008+fderuiter@users.noreply.github.com>
This PR refactors several modules in
math_explorerto adhere to DRY and SOLID principles.unwrap()insimple_randomization(deprecated wrapper), replacing it withexpectfor better safety/documentation.impl_vector_ops!macro inode.rsand applied it toSIRStateandSEIRStateincompartmental.rs, removing repetitive manual implementation of arithmetic traits.ActivationFunctiontrait inai/activations.rs.ReLU,LeakyReLU,Sigmoid,Tanh.Predictor,Encoder,Decoder, andAutoencoderto be generic overA: ActivationFunction<f32>.Autoencoder,Encoder, etc.) defaulting toLeakyReLUto ensure backward compatibility with existing code (e.g.,Cera).leaky_reluusage in models.All tests passed.
PR created automatically by Jules for task 17486821741747226782 started by @fderuiter