-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 graph visualization feature #1976
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The requirements are not satisfied.
In the ScenarioConfig class, we want a new method named draw() that exports the scenario configuration graph as an image file.
The graph comprises the input DataNodeConfigs, the output DataNodeConfigs, and the TaskConfigs as nodes.
A directed edge exists from a DatanodeConfig
node to a TaskConfig
node if and only if the DatanodeConfig
is a TaskConfig
's input.
A directed edge exists from a TaskConfig
node to a DatanodeConfig
node if and only if the DatanodeConfig
is a TaskConfig
input.
If a new package is required, it must be made optional. The draw function should check the presence of the package before using it. If the package is not installed, the draw function should log a warning message and return doing nothing else.
…ion' into bug/Avaiga#1592-graph-visualization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several remarks:
- The main code should not be committed.
- The
ScenarioConfig
class already exists. You should use it. - The creation of the graph is not integrated with Taipy. The graph already exists as a set of task configs. It must be converted into a networkx DAG. A dedicated method could be exposed in the
ScenarioConfig
class for building the dag as a nx object. - The feature should be generic. In particular, the size of the graph may vary a lot.
- Many unit tests are expected in this PR. Several use cases must be tested with various graph sizes and shapes.
- No print is allowed. Please use a Taipy Logger.
- The pictures should not be committed.
@@ -0,0 +1,46 @@ | |||
import matplotlib.pyplot as plt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be an optional dependency. Please verify it is installed before using it.
import networkx as nx | ||
|
||
|
||
class ScenarioConfig: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a Scenario Config class that already contains a DAG. It must be re-used.
The purpose is to add a draw
method to this class.
@satyyam11 any news? Do my comments make sense to you? |
i want to work on this issue please assig to me @jrobinAV |
@Manideep-Maddileti This is a Pull request. Please feel free to contribute by reviewing the code, and add any comment. If you want, you can also be assigned to the related issue #1592 and propose your own Pull Request. |
This PR has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this PR, then please add new commit or another comment, otherwise this PR will be closed in 14 days. For more information please refer to the contributing guidelines. |
@satyyam11 Any news ? |
This pull request addresses issue #1592 by introducing a new graph visualization feature to the project.
The changes include a new graph_visualizer.py file with a function to visualize scenario configuration graphs using networkx and matplotlib.
Additionally, the config/init.py file was updated to load the configuration and call the visualization function. This enhancement provides a visual representation of nodes and edges in the configuration, making it easier to understand and debug complex scenarios.
Dependencies for networkx and matplotlib are required, which can be installed via pip. Please review and merge this PR to integrate the new feature into the project.