Summary
Port the Python protocols.py type system to Julia using abstract types, structs, and multiple dispatch.
Types to Implement
| Python |
Julia equivalent |
ModelWorld Protocol |
abstract type AbstractModelWorld end |
Scorer Protocol |
abstract type AbstractScorer end |
Observable |
struct Observable |
Tier enum |
@enum Tier EMBEDDED PENALIZED DIAGNOSTIC COST |
Direction enum |
@enum Direction MINIMIZE MAXIMIZE |
TrialResult |
struct TrialResult |
Annotation |
struct Annotation |
ResultsTable |
struct ResultsTable with Tables.jl interface |
Design Notes
- Use Julia's native multiple dispatch instead of Protocol ABCs.
AbstractModelWorld subtypes must implement simulate(::T, params) and observe(::T, sim).
AbstractScorer subtypes must implement score(::T, obs, pred).
- Consider Tables.jl compliance for ResultsTable.
Acceptance Criteria
Summary
Port the Python
protocols.pytype system to Julia using abstract types, structs, and multiple dispatch.Types to Implement
ModelWorldProtocolabstract type AbstractModelWorld endScorerProtocolabstract type AbstractScorer endObservablestruct ObservableTierenum@enum Tier EMBEDDED PENALIZED DIAGNOSTIC COSTDirectionenum@enum Direction MINIMIZE MAXIMIZETrialResultstruct TrialResultAnnotationstruct AnnotationResultsTablestruct ResultsTablewith Tables.jl interfaceDesign Notes
AbstractModelWorldsubtypes must implementsimulate(::T, params)andobserve(::T, sim).AbstractScorersubtypes must implementscore(::T, obs, pred).Acceptance Criteria
TradeStudy