modlee.model_text_converter module
Convertor for model objects into text (deprecated?).
- modlee.model_text_converter.exhaust_sequence_branch(root_sequence_module, custom_history)[source]
Exhaust a module as a tree to find custom modules,
- Parameters:
root_sequence_module – The root node/module of the model.
custom_history – A list of custom module names.
- Returns:
A tuple of lists ([custom module objects], [custom module names])
- modlee.model_text_converter.get_code_text(code_text, module, custom_history)[source]
Get a code text representation of a model as its __init__ and forward functions.
- Parameters:
code_text – The current code text if there are other dependencies, can be empty ‘’.
module – The module for which to get the code text.
custom_history – A list of the history of custom modules.
- Returns:
A tuple of code_text, custom_child_module_list, custom_history.