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

Add _repr_html_ for TaskGraph #70

Closed
SimonHeybrock opened this issue Nov 2, 2023 · 6 comments · Fixed by #78 or #99
Closed

Add _repr_html_ for TaskGraph #70

SimonHeybrock opened this issue Nov 2, 2023 · 6 comments · Fixed by #78 or #99
Assignees

Comments

@SimonHeybrock
Copy link
Member

No description provided.

@SimonHeybrock SimonHeybrock moved this from Selected to Next in Development Board Nov 2, 2023
@SimonHeybrock SimonHeybrock changed the title Add _repr_html_ for Pipeline and TaskGroup Add _repr_html_ for Pipeline and TaskGraph Nov 2, 2023
@SimonHeybrock SimonHeybrock moved this from Next to Selected in Development Board Nov 9, 2023
@SimonHeybrock SimonHeybrock self-assigned this Nov 14, 2023
@SimonHeybrock SimonHeybrock moved this from Selected to In progress in Development Board Nov 14, 2023
@SimonHeybrock SimonHeybrock moved this from In progress to Selected in Development Board Nov 14, 2023
@SimonHeybrock SimonHeybrock removed their assignment Nov 14, 2023
@jokasimr
Copy link
Contributor

jokasimr commented Nov 16, 2023

What should the html representation for Pipeline display?

Some suggestions:

  • List of the providers in alphabetical order.
    • Show their descriptions (shortened if too long to fit, allow expansion / link to docs?).
    • For each provider, indicate if its preconditions are satisfied, perhaps display what is missing?
  • List of parameters and their values + description / link to docs.

@SimonHeybrock
Copy link
Member Author

List of the providers in alphabetical order.

We should order alphabetically by the type that is provided, the provider names may be of secondary interest.

There is also a third case, parameter tables. So a good starting point may be:

  • Table with 3 columns
  • First column: Type
  • Second column: category (provider/param/param table)
  • Third column: provider name/param value/summary of param table, depending on what we have in second column

Instead of a table with the category in the second column, one could also choose to output in three sections, each with 2 columns (1 and 3 above).

I think the main work will be to implement gathering all the info, we can then try different options for representing it?

@SimonHeybrock
Copy link
Member Author

or each provider, indicate if its preconditions are satisfied, perhaps display what is missing?

Yes, we could list all the dependencies, may indicate with color if it is satisfied?

@jokasimr jokasimr self-assigned this Nov 24, 2023
@jokasimr jokasimr moved this from Selected to In progress in Development Board Nov 24, 2023
@jokasimr
Copy link
Contributor

jokasimr commented Nov 24, 2023

I think the main work will be to implement gathering all the info

Currently Pipeline stores parameters as provider functions without arguments.
Therefore we can not directly determine if the pipeline was initiated with a provider function without arguments or if it was initiated with a parameter.

We could use some heuristics.
Would it be correct to display every zero-arguments provider as a parameter?
It would make sense if the provider functions are pure, but I don't know if that is a guarantee or just a recommendation from sciline to make the providers pure.

Another stricter option would be to treat every zero-arguments anonymous function as a parameter.

A third option would be to explicitly store information about what types were provided as parameters and what types were provided as functions.

@jokasimr jokasimr moved this from In progress to Selected in Development Board Nov 24, 2023
@jokasimr jokasimr removed their assignment Nov 24, 2023
@SimonHeybrock
Copy link
Member Author

SimonHeybrock commented Nov 27, 2023

We could use some heuristics.

We can use the same approach as in the graph visualization code, no tricks or heuristics required (maybe going via a string can be avoided as well):

# Do not draw dummy providers created by Pipeline when setting instances
if p_name in (
f'{_qualname(Pipeline.__setitem__)}.<locals>.<lambda>',
f'{_qualname(Pipeline.set_param_table)}.<locals>.<lambda>',
):

@jokasimr jokasimr self-assigned this Dec 1, 2023
@jokasimr jokasimr moved this from Selected to In progress in Development Board Dec 1, 2023
@github-project-automation github-project-automation bot moved this from In progress to Done in Development Board Jan 11, 2024
@SimonHeybrock
Copy link
Member Author

Reopening since only Pipeline._repr_html_ has been implemented so far.

@SimonHeybrock SimonHeybrock reopened this Jan 11, 2024
@github-project-automation github-project-automation bot moved this from Done to In progress in Development Board Jan 11, 2024
@SimonHeybrock SimonHeybrock moved this from In progress to Selected in Development Board Jan 11, 2024
@jokasimr jokasimr changed the title Add _repr_html_ for Pipeline and TaskGraph Add _repr_html_ for TaskGraph Jan 11, 2024
@jokasimr jokasimr self-assigned this Jan 11, 2024
@jokasimr jokasimr moved this from Selected to In progress in Development Board Jan 11, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Development Board Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants