FAQ

As you get started with emodpy-measles, you may have questions. Common questions are answered below.

For questions related to functionality in related packages, see the following documentation:

Why does the system download a new Eradication binary (and supporting binaries/schema) each time I run?

The system is designed very much like you browse the web. When you go to a website/page, it downloads html, png and other files. If you go there again, it does it again. We don’t even think about it (unless we have network issues). We want this to be the New Normal. You get the latest binary from measles-Ongoing branch that Passes All The Tests. That said, we know there are times when stasis and stability are paramount. To that end, you can pass a bamboo build number to ‘get_model_files( plan, manifest )’ and you’ll always get that one.

I want to just put a binary (and corresponding schema) in the downloads directory and not doing any more downloads.

Comment out the call to ‘get_model_files’.

What is the purpose of the manifest.py file?

manifest.py is designed to house ALL your input and output paths in a single location. It also includes the path of your choice for where model binaries (and schema) are downloaded to and uploaded from. This is because even though you can happily ignore these files if you want, you’ll have a better EMOD experience if you can easily reference the schema file and sometimes it’s nice to be able to have access to the binary itself.

How do I set config parameters?

Provide a param-setting function and pass that function to the emodpy task creator (example). In that function, you can set parameters directly (example). Or you can call a function in a standalone script that does the config params (example).

Are there defaults?

Great question. If you didn’t set any config params at all, they will have defaults based on the schema. But you can add, for example, a function in emodpy_measles.config called set_team_defaults().

I pip installed emodpy-measles, but I want to make changes. How should I do that?

python package_setup.py develop There are some other options but that seems to be the most popular and proven. This means that the emodpy-measles module in site-packages actually points to the same code as you have in your git checked-out repo. This link is useful for details. But we want you to get the changes you like into the tested, versioned, released module before too long.

I notice that I can import emod_api.campaign and use that as an object. I haven’t seen that before.

Sure. Python modules are a lot like singletons. There’s no need to add a static class inside that module in many cases. Think of the module (which can have variables and methods) as a static class.

I want to just load a demographics.json, not create one programmatically.

OK, but be aware that one of the benefits of emodpy/emodapi is that you get guaranteed consistency between demographics settings and config params. But if you really want to use a raw demographics.json that you are very confident in, you can open that in your demog builder. An example of that is:

def build_demog():
import emod_api.demographics.Demographics as Demographics
demog = Demographics.from_file( "demographics.json" )
return demog

What happens if I don’t VPN in?

You can’t access Bamboo and download the Eradication binaries (including plugins and schema). An alternative system is under development and available in beta to folks who need it.

How do I specify the number of cores?

num_cores is an undocumented param to Platform(). It is not a DTK config param.

How do I specify the log level for DTK? I get a schema error when I try to set it now.

An example of how to set non-schema config params is coming soon.

How do I do campaign sweeps?

You can look at (this example) in Malaria. A campaign sweep example will be added to emodpy-measles.

How do I do demographics sweeps?

A demographic sweep example will be added to emodpy-measles.