You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should improve the interface of how we launch simulations. In order to have everything in a more tidy way. We should create data structures that gather multiple parameters driving simulations.
Here's a draft of the prototype I have in mind:
Model parameters
PhysicalParameters struct to hold all parameters related to model physics.
Hyperparameters struct holding all the hyperparameters from the neural network.
SolverParameters struct holding all parameters to configure the solver.
UDEparameters struct holding all parameters for the training of the UDE. It's a child of SolverParameters, since it also includes a solver.
OGGMparameters struct wrapping OGGM's parameters
SimulationParameters struct holding the parameters defining a simulation
Parameters: struct holding all the parameter types.
Models
Machine struct holding an ML model (e.g. a neural network) + a Hyperparameters struct. Inspired by MLJ.jl. When initialized inside a Model, it automatically fetches the Hyperparameters to generate the NN.
MBmodel struct defining a mass balance model. It can have children like TImodel.
IceflowModel struct defining an ice flow model. It can have children, like SIAmodel
Model struct, contains all information about the PhysicalParameters, SolverParameters, UDEparameters, OGGMparameters, Machine, MBmodel, IceflowModel
Glaciers, intial conditions and climate data
Climate struct containing climate data series for a Glacier.
Glaciers struct containing OGGM's gdirs and additional information on the Julia side, for example its Climate.
Simulations
Simulation (inmutable?) struct holding all the data necessary for a simulation: Model, Glaciers, its type (functional inversion, inversion or forward).
To be run such as:
# Produce everything needed for a simulation# First we create the model parameters
parameters =Parameters(; physics =PhysicsParameters(),
hyper =Hyperparameters(),
solver =SolverParameters(),
UDE =UDEparameters(),
OGGM =OGGMparameters(workspace_path),
simulation =SimulationParameters())
# Then we generate the models to be run
model =Model(IceflowModel(), MBmodel(), Machine(), params)
glaciers =Glaciers(rgi_ids)
add_climate!(Glaciers, time_period)
# We create a simulation based on everything we generated before
simulation =Simulation(model, glaciers, parameters)
# We finally run the simulationrun!(simulation)
Beyond this, we should also accommodate an API similar to OGGM's, where everything is based on entity_tasks around glacier directories. Since Julia is not OO, entity tasks would just be functions with a common interface, run on Glaciers. Something like:
We should improve the interface of how we launch simulations. In order to have everything in a more tidy way. We should create data structures that gather multiple parameters driving simulations.
Here's a draft of the prototype I have in mind:
Model parameters
PhysicalParameters
struct to hold all parameters related to model physics.Hyperparameters
struct holding all the hyperparameters from the neural network.SolverParameters
struct holding all parameters to configure the solver.UDEparameters
struct holding all parameters for the training of the UDE. It's a child ofSolverParameters
, since it also includes a solver.OGGMparameters
struct wrapping OGGM's parametersSimulationParameters
struct holding the parameters defining a simulationParameters
: struct holding all the parameter types.Models
Machine
struct holding an ML model (e.g. a neural network) + aHyperparameters
struct. Inspired byMLJ.jl
. When initialized inside aModel
, it automatically fetches theHyperparameters
to generate the NN.MBmodel
struct defining a mass balance model. It can have children likeTImodel
.IceflowModel
struct defining an ice flow model. It can have children, likeSIAmodel
Model
struct, contains all information about thePhysicalParameters
,SolverParameters
,UDEparameters
,OGGMparameters
,Machine
,MBmodel
,IceflowModel
Glaciers, intial conditions and climate data
Climate
struct containing climate data series for aGlacier
.Glaciers
struct containing OGGM'sgdir
s and additional information on the Julia side, for example itsClimate
.Simulations
Simulation
(inmutable?) struct holding all the data necessary for a simulation:Model
,Glacier
s, its type (functional inversion
,inversion
orforward
).To be run such as:
Beyond this, we should also accommodate an API similar to OGGM's, where everything is based on
entity_tasks
around glacier directories. Since Julia is not OO, entity tasks would just be functions with a common interface, run onGlaciers
. Something like:The text was updated successfully, but these errors were encountered: