alan-turing-institute / vivarium_population_spenser

Vivarium microsimulation tools used to model population evolution with the SPENSER project
GNU General Public License v3.0
3 stars 0 forks source link

Pipeline in notebook #18

Closed crangelsmith closed 4 years ago

crangelsmith commented 4 years ago

Design a pipeline for running the dynamic model on the data:

crangelsmith commented 4 years ago

Example in here https://github.com/alan-turing-institute/vivarium_public_health_spenser/blob/master/tests/population/test_mortality.py

kasra-hosseini commented 4 years ago

@crangelsmith Here is one example notebook for the mortality pipeline:

https://github.com/alan-turing-institute/vivarium_public_health_spenser/blob/feature/18-pipeline/notebooks/pipeline_001_mortality.ipynb

Currently, the components are components = [TestPopulation(), Mortality()] (and not fertility). Before PR, could you please take a look at it? I am thinking to move some of the inputs to an external config file. What do you think?

I am also not sure about:

def base_plugins_simulation():
    config = {'required': {
                  'data': {
                      'controller': 'vivarium_public_health.testing.mock_artifact.MockArtifactManager',
                      'builder_interface': 'vivarium.framework.artifact.ArtifactInterface'
                  }
             }
    }

    return ConfigTree(config)

Do we need to change the controller?

crangelsmith commented 4 years ago

Hi @kasra-hosseini,

The notebook looks great! You should definitely show that tomorrow! I think it makes sense to move the inputs to a external config file.

About the base plugins, I'm not sure exactly what is their role now. In principle we don't have any mock artifacts anymore but i'm not sure if there isn't a hidden dependency that would break if we remove it.

Also, could you add an environment yml file with all the needed libraries to run the notebook? For me it is not running just strait out of the box.

kasra-hosseini commented 4 years ago

@crangelsmith Great! Thanks for the comments. I will then move the inputs to an external config file, add an environment yml and then make a PR.

About the base plugins, I'm not sure exactly what is their role now. In principle we don't have any mock artifacts anymore but i'm not sure if there isn't a hidden dependency that would break if we remove it.

Currently, it doesn't work without the mock artifacts, but maybe there are other controllers that we should use. I will check this maybe later today.

kasra-hosseini commented 4 years ago

See PR: https://github.com/alan-turing-institute/vivarium_public_health_spenser/pull/22