Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Requirement] UI components for selecting, configuring, and running workflows #28

Open
SimonHeybrock opened this issue May 16, 2024 · 3 comments

Comments

@SimonHeybrock
Copy link
Member

SimonHeybrock commented May 16, 2024

Executive summary

For the "80%" of basic workflow use, we need a simple interface that reduces the need for Python knowledge.

Context and background knowledge

Users need to create and configure workflows. In many cases the workflow are pre-built in the ESS* packages and need configuration. Simple GUI tools based on (probably?) ipywidgets are needed for all ESS* packages. These GUI components will, step by step (e.g., in a series of tabs), allow for:

  1. Select a workflow. Assume that we can get a list of workflows from the package, i.e., as input. Each workflow will come with a description (e.g., the docstring) which should be displayed.
  2. Set workflow params in widgets.
  3. Optionally, define tables of params.
  4. Select targets for computation, could be a single final result, or multiple, including intermediate results.
  5. Run the workflow.
  6. Plot or save outputs.

This requirement is a high-level overview, individual parts will be described in more detail in sub-requirements.

Have a look at, e.g., https://docs.mantidproject.org/v6.1.0/algorithms/LoadEventNexus-v1.html. The widget and the table of properties in the docs page was generated programmatically. This corresponds to step 2.) above.

Inputs

  • A package can provide a list of workflows.
  • Input params can be obtained from the workflow. There will be a mapping between input keys of the workflow and implementations of a Param class. The latter includes things such as a description (to be shown in the GUI), bounds, validators, ...
    • Need a way of marking parameters as advanced, so they can be hidden in default view of widgets.
  • Targets could be any key in the pipeline, but likely we will want some customization, i.e., the workflow may specify this.

Methodology

Python function in a helper module that can be used to auto-generate a widget.

Outputs

A widget that can be used in a Jupyter notebook. Depending on where we stop in the listing, this might return a configured pipeline, a task graph, results, or even run, plot, and save directly.

Which interfaces are required?

Python module / function

Test cases

ESSsans is a good candidate for prototyping and trying this out

Comments

No response

@SimonHeybrock SimonHeybrock changed the title [Requirement] UI component for selecting, configuring, and running workflows [Requirement] UI components for selecting, configuring, and running workflows May 22, 2024
@SimonHeybrock
Copy link
Member Author

Widget team initial goal:

  • What is needed from Python package beyond Sequence[Workflow]?
  • What does Workflow need beyond Sequence[Parameter] to generate widgets?
  • Find out if draft of Parameter class in branch param-class has all necessary info.

Parameter/workflow team initial goal:

  • How to interface parameters with pipeline. How do we get or define the Sequence[Parameter]?

See https://github.com/scipp/esssans/blob/a614f49492453cf6ea0f1615e63898b77b7303f6/src/ess/loki/general.py#L60-L84 for an example of a current workflow, which also defines default params.

@YooSunYoung
Copy link
Member

YooSunYoung commented Jul 31, 2024

  • What is needed from Python package beyond Sequence[Workflow]?
  • Interesting targets, things to be computed - we tried to detect all the output leaves, but then there are providers that are not used, i.e. SamplePosition[EmptyRun] due to how generic provider works.
  • Root leaves, things to be set as parameters - more precisely, a handle that widget object can access all the parameters to be set.

Description helpers

  • New Types docstrings.

@SimonHeybrock
Copy link
Member Author

Whiteboards from today:
IMG_0728
IMG_0727

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants