Skip to content

UI to run a new fitting experiment #277

@jonc125

Description

@jonc125

Recall that a fitting spec is linked to a protocol (later maybe more than one) which is in turn linked to zero or more datasets.
To be able to run a fit we need to specify:

  • Version of fitting spec
  • Version of protocol
  • Dataset
  • Version of model

This view is reached initially via a button from viewing a single version of a fitting spec.
Later, via a button from a dataset (iff there is a fitting spec connected to a linked protocol) or model.

The view should have 4 drop-down menus in a row, to select Fitting spec, Protocol, Dataset, Model.
One of these will be pre-selected and unable to be changed, depending on how the view was reached.

Selecting options from each drop-down will constrain what options are offered in the others, with Javascript code updating the lists.

  • Once a fitting spec is chosen, only linked protocols and datasets are available. Similarly if we start from a dataset.
  • Initially all models are listed, but eventually these will be filtered to show only those with an interface compatible to the selected protocol & fitting spec (once this interface info is in the DB)

Under each of the top drop-downs with versions (i.e. not datasets) there should be a drop-down to select version, defaulting to the latest.
This should be greyed out until a selection is made in the upper row, and then filled in via an AJAX call with the available versions.

At the bottom there should be a button 'Fit model to data' which submits the fitting experiment to the queue.

The submission & result retrieval system will be very similar to that for normal experiments; common code should be extracted. See also #134.
See the if protocol.is_fitting_spec branch in experiments/processing.py for what needs to be sent to the back-end for a fitting experiment.
It might make sense to change submit_experiment so it takes model_version etc as a CachedModelVersion, drops the model & protocol arguments (since these can be found from the cached versions) and has optional dataset and fitting_spec_version arguments?

Child of #135.

Tasks:

  • Create basic view with form
  • Back end validation of valid entity / version combinations
  • Allow preselection of entities and versions on page load
  • Check user permissions on entities (preselected and submitted)
  • Check user permissions on ajax endpoint
  • Submit fitting experiment to back end
  • Simplify call signature for submission code
  • Javascript filtering of dropdown values
    • Grey out versions until entity selected
    • Ajax endpoint to provide valid values
  • Page and form styling
  • Buttons from entity pages
  • The JS action to re-run a fitting experiment doesn't work - it tries to do a normal experiment run, not a fitting experiment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions