flatironinstitute / dendro-old

Analyze neuroscience data in the cloud
https://flatironinstitute.github.io/dendro-docs/
Apache License 2.0
19 stars 2 forks source link

Export / Import Job configurations as JSON #115

Closed alejoe91 closed 8 months ago

alejoe91 commented 8 months ago

A user might want to save a preset of parameters for a specificic app.

These could be saved in the project folder and rendered as a dropdown if available

luiztauffer commented 8 months ago

Since all jobs parameters are stored in the database, I believe we can generalize this with two functionalities:

  1. Export to JSON – this would contain all relevant information to fully reproduce a given job:
{
    input: {… input files and configuration …}
    resources:  {… resources configuration …}
    processor: {… processor parameters …}
}
  1. Load from JSON – when submitting new jobs, users could import the preset for input, resources and processor from these files
magland commented 8 months ago

@luiztauffer @alejoe91

I implemented this somewhat differently that proposed (for now).

But the upshot is... there are now a "save parameters" and "load parameters" buttons at the top of the parameter input form.

It saves the parameters in the "parameter-sets" folder of the project.

image

luiztauffer commented 8 months ago

@magland this looks great, thanks! I just tried it, would it be possible to load the parameters from a json file? It could be the one we can export from the Job panel for example. In this way people can easily share and re-use their job configurations in different Projects

magland commented 8 months ago

@luiztauffer This should be working now. See #121.