You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we are switching over to GrFN3 we need to revamp the grfn2cag translation pipeline. @aswinchester this would be a great task for you to get integrated into the core of the AutoMATES repository. Please reach out to @dpdicken and @titomeister for assistance as you accomplish this task. They will be more than happy to pair-program with you and help you along the way!
All tasks for this issue should be carried out on the grfn2gromet branch or a child branch from that branch. DO NOT attempt to do this on master because the setup tests and objects only exist on the grfn2gromet branch.
Useful pointers
automates/model_assembly/networks.py: this file contains the class definitions for the GroundedFunctionNetwork and the CausalAnalysisGraph classes. This file should be the one location where implementations need to be made.
scripts/model_assembly/py2grfn.py: this is a script that will run our whole pipeline to translate Python source code into a GrFN/CAG. Read the flag definitions carefully. You will need to supply the correct flags to actually run CAG generation and to test whether the CAG is equivalent to one saved/loaded from JSON.
tests/data/program_analysis/language_tests/python/<idiom-name>/<test-name>/<test-name>.py: this is a collection of Python code examples that can be used to see if we can generate CAGs for certain programming idioms that we may see in scientific model source code.
tests/model_assembly/test_grfn2cag.py: this is a file where tests exist that will test whether the methods that will be defined as part of this issue are working or not. Use this file to determine if your implementations are successful or not after you can successfully run the py2grfn.py script.
tests/conftest.py: a helper file for the tests mentioned above that defines pytest fixtures used during the testing process.
Tasks
Implement the methods defined in both the CausalAnalysisGraph and CAGContainer classes marked with TODO: @Alex ....
CausalAnalysisGraph.from_GrFN(): this method creates a CausalAnalysisGraph from a GroundedFunctionNetwork
CausalAnalysisGraph.from_json_file(): this method creates a CausalAnalysisGraph from a CAG.json file
CAGContainer.from_func_node(): this method creates a CAGContainer from a GrFN BaseConFuncNode. Containers in a CAG play the role of determining variable node subgraph membership based upon the functions found in the GrFN parent. Ask @cl4yton if you need guidance on what a CAGContainer should look like.
CAGContainer.from_dict(): this method creates a CAGContainer from a dictionary of data. This dict is derived from a re-loaded CAG.json.
Add a to_igraph_gml() method in the CausalAnalysisGraph class that allows the CAG to be converted to an igraph object that can be used with the identifiability algorithm. An example of this for the old CAG class is in the same file (commented out and below the new class definition).
Helpful tips
When making the from_json_file and from_dict methods take a look at the already implemented to_json and to_dict methods because those reveal what information is expected to be present in the CAG.json.
The text was updated successfully, but these errors were encountered:
Overview
Now that we are switching over to GrFN3 we need to revamp the grfn2cag translation pipeline. @aswinchester this would be a great task for you to get integrated into the core of the AutoMATES repository. Please reach out to @dpdicken and @titomeister for assistance as you accomplish this task. They will be more than happy to pair-program with you and help you along the way!
Everyone
grfn2gromet
branch or a child branch from that branch. DO NOT attempt to do this on master because the setup tests and objects only exist on thegrfn2gromet
branch.Useful pointers
automates/model_assembly/networks.py
: this file contains the class definitions for theGroundedFunctionNetwork
and theCausalAnalysisGraph
classes. This file should be the one location where implementations need to be made.scripts/model_assembly/py2grfn.py
: this is a script that will run our whole pipeline to translate Python source code into a GrFN/CAG. Read the flag definitions carefully. You will need to supply the correct flags to actually run CAG generation and to test whether the CAG is equivalent to one saved/loaded from JSON.tests/data/program_analysis/language_tests/python/<idiom-name>/<test-name>/<test-name>.py
: this is a collection of Python code examples that can be used to see if we can generate CAGs for certain programming idioms that we may see in scientific model source code.tests/model_assembly/test_grfn2cag.py
: this is a file where tests exist that will test whether the methods that will be defined as part of this issue are working or not. Use this file to determine if your implementations are successful or not after you can successfully run thepy2grfn.py
script.tests/conftest.py
: a helper file for the tests mentioned above that defines pytest fixtures used during the testing process.Tasks
CausalAnalysisGraph
andCAGContainer
classes marked withTODO: @Alex ...
.CausalAnalysisGraph.from_GrFN()
: this method creates aCausalAnalysisGraph
from aGroundedFunctionNetwork
CausalAnalysisGraph.from_json_file()
: this method creates aCausalAnalysisGraph
from a CAG.json fileCAGContainer.from_func_node()
: this method creates aCAGContainer
from a GrFNBaseConFuncNode
. Containers in a CAG play the role of determining variable node subgraph membership based upon the functions found in the GrFN parent. Ask @cl4yton if you need guidance on what aCAGContainer
should look like.CAGContainer.from_dict()
: this method creates aCAGContainer
from a dictionary of data. This dict is derived from a re-loaded CAG.json.to_igraph_gml()
method in theCausalAnalysisGraph
class that allows the CAG to be converted to an igraph object that can be used with the identifiability algorithm. An example of this for the old CAG class is in the same file (commented out and below the new class definition).Helpful tips
from_json_file
andfrom_dict
methods take a look at the already implementedto_json
andto_dict
methods because those reveal what information is expected to be present in the CAG.json.The text was updated successfully, but these errors were encountered: