openfl icon indicating copy to clipboard operation
openfl copied to clipboard

Resolve AST parsing error in Jupyter Notebook

Open KeertiX opened this issue 2 years ago • 0 comments

ISSUE :

  • Described in #724

STEPS TO REPRODUCE :

  • Described in #724

FIX DESCRIPTION / SUMMARY OF CHANGES

  1. Refactor Flowgraph related functionality (graph and steps creation) to InspectFlow() Rationale: There is no need to create the graph and steps in MetaflowInterface and these steps can be performed only if the user desires to generate FlowGraph

  2. Fetch the source code of flow instead of module in FlowGraph() Rationale: Only flow source code is required for generation of Graph.  Understanding is that this change should also obviate the need to reload the module as it should always fetch the updated source code for the flow

VERIFICATION SUMMARY:

Verified if the fix is working in Google colab, Jupyter notebook and python file

  • Add bug in any of the jupyter notebook cell/google colab/py file and run.
  • Fix the issue and rerun the cell till flflow.run to verify whether its throwing AST error
  • For supported flows, verified that graph html is generated properly

Closes #724

KeertiX avatar Feb 16 '23 10:02 KeertiX