Skip to content

Implement 'fake' back-end fitting flow #137

@jonc125

Description

@jonc125

Alongside preparing the front-end aspects, we can actually implement fitting in the back-end fc-runner, similarly to Aidan's prototype. The back-end web service can have an extra API added that takes a 'fitting spec' and 'dataset' as well as model and protocol, and runs a single hardcoded fit, returning results. A temporary hack in the front-end can then recognise a 'magic' protocol and call this new API instead of the standard simulation.

This will require changes to at least 4 repos, not just this one. But I've stuck the issue here for convenience! @MichaelClerx you can create separate issues if desired.

WebLab:

  • Recognise a protocol that has a .csv file in it, and call the new API rather than the standard experiment runner. Pass the protocol's URL as the dataset and fitting-spec parameters.
  • Possibly the protocol should also contain a file with pints code to provide a realistic fitting spec?

fc-runner:

  • Add the new API to chastewebservice.py.
    • It should download and unpack the dataset and fitting spec, since from the above these should be real URLs and at least the dataset should contain a .csv with data.
  • Ensure it has suitable error handling logic as for the existing experiment runner (perhaps refactoring as needed)

weblab-fc:

  • Implement the special-case fit in here? (Keeping with pycml etc for code generation.)

deployment (I can help with this bit @MichaelClerx - perhaps work on it together on Thurs?):

  • Deploy the new fc-runner (i.e. the branch of the deployment repo that tests all this must deploy the corresponding fc-runner branch)
  • Deploy the code that runs the fit (
  • Deploy the hacky WebLab branch

Related to #19 (if needed).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions