mlexchange / mlex_prefect_worker

Other
0 stars 2 forks source link

More consistent way of passing model parameters #6

Closed dylanmcreynolds closed 9 months ago

dylanmcreynolds commented 9 months ago

As we worked to link the new prefect worker to the model, we came across an issue where there are a large number of parameters sent into the model. These are a little hard to track, and they are a mixture of positional parameters and a json tree.

What if we did this?

@Wiebke @taxe10 @TibbersHao is this flexible enough?

TibbersHao commented 9 months ago

Adding notes from today's group meeting discussion:

For DLSIA training side, the plan to accommodate parameter loading:

  1. Refactor the parameter class into individual classes that will be model-specific, and each will inherit from a mother class which will hold general parameters that will be used in all scenarios. Benefits of this way:
  1. both train.py and segment.py script will take only one argument, most likely a file path of the json or yml file that dash app generates for the parameters (in a dictionary) in order to execute the job.

Structure of the dictionary (version 1):

{
data_tiled_uri: 
data_tiled_api_key: 
mask_tiled_uri: 
mask_tiled_api_key: 
seg_tiled_uri: 
seg_tiled_api_key: 
uid: 
model_parameters: {
    model_name:
    num_classes: xxx
    ...
    }
}

This will be a discussion topic for Friday's hackathon.

dylanmcreynolds commented 9 months ago

Closing as I believe it's done. Please re-open if I missed something