🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 4 Min Lesezeit
0

Halfway Through GSoC

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Hey everyone! We have officially hit the halfway mark of the Google Summer of Code (GSoC) 2026 coding period.



These past two weeks have been heavily focused on expanding the and .



Here is a breakdown of what I worked on, the architectural challenges we solved, and some vital lessons learned about failing fast and role-neutral design.






suggested that I should refactor the base builder and DensityEstimatorBuilder methods to accept (batch_input, batch_condition).



Now, the trainers handle the role assignment via the _wrap_builder() closure:





  • For NPE: build(batch_input=batch_theta, batch_condition=batch_x)


  • For NLE: build(batch_input=batch_x, batch_condition=batch_theta)



This change cleanly decouples the mathematical model the network represents from the data types the network consumes.





Parameterizing Tests



During review, my mentor also suggested that the NPE and NLE integration tests were essentially "twin" tests doing the exact same thing with different objects, we parameterized them!




CODE
TRAINERS = [(NPE_C, posterior_nn, "theta"), (NLE_A, likelihood_nn, "x")]

@pytest.mark.parametrize("trainer,factory", [(t, f) for t, f, _ in TRAINERS], ids=["npe", "nle"])
def test_string_emits_deprecation_warning(trainer, factory):
prior = MultivariateNormal(zeros(2), eye(2))
with pytest.warns(FutureWarning, match="deprecated"):
trainer(prior, density_estimator="maf", show_progress_bars=False)






This saved a ton of code duplication while keeping the coverage identical.






PR #1912: Mixed Density Estimators (MNLE & MNPE)



For datasets containing mixed data types (both continuous and discrete variables), sbi uses Mixed Neural Posterior/Likelihood Estimators (MNPE/MNLE).



To support these, I created a sibling class to our main builder: the MixedDensityEstimatorBuilder.






"continuous_model" over "model"



Our main design choice here was using the field continuous_model instead of just model. This is because the supported mixed architectures include non-flow models like MDN and MADE. Now, a user can explicitly configure the continuous sub-network: MixedDensityEstimatorBuilder(continuous_model="nsf").






Failing Fast is Better Than Failing Late



MNPE requires a MixedDensityEstimator. If a user accidentally passed a standard DensityEstimatorBuilder (e.g., MNPE(density_estimator=DensityEstimatorBuilder())), the code would gladly accept it, train an entire continuous normal flow for hundreds of epochs, and then crash at the very end when it finally checked the returned class type.



Failing at the end of a long training run with a cryptic error is terrible UX.



We added a strict type-check inside the trainer initialization to fail fast:




CODE
elif isinstance(density_estimator, _EstimatorBuilderBase) and not isinstance(
density_estimator, MixedDensityEstimatorBuilder
):
raise TypeError(
"MNPE requires a MixedDensityEstimatorBuilder; got "
f"{type(density_estimator).__name__}. Use "
"MixedDensityEstimatorBuilder(continuous_model=...)."
)






Now, if a user makes this mistake, the code crashes instantly with clear instructions on how to fix it, saving hours of compute time.






Catching Configuration Drift



We defined _VALID_MIXED_CONTINUOUS_MODELS to validate inputs. However, hardcoding this set means it could drift away from the actual supported models in the factory if another developer adds a model later. To prevent this, I added a test specifically designed to catch configuration drift:




CODE
def test_valid_continuous_models_match_builders():
from sbi.neural_nets.net_builders.mixed_nets import model_builders
assert _VALID_MIXED_CONTINUOUS_MODELS == frozenset(model_builders)









What's Next?



We are halfway there! The continuous and mixed density estimators are successfully wired into the system. Next up, we will be tackling the remaining likelihood and classifier builders to complete the NN Builder ecosystem.



Thanks for reading, and stay tuned for the next update!

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
1 Quelle
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
1 Quelle
Major AI platforms go down in unprecedented simultaneous outage
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Halfway Through GSoC

Thematisch verwandte Begriffe: Halfway, Through, GSoC · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...