neuralogic.utils.visualize
- draw_grounding(grounding, filename: str | None = None, show=True, img_type='png', value_detail: int = 0, graphviz_path: str | None = None, *args, **kwargs)[source]
- Draws sample’s grounding either as an image of type img_type either into:
a file - if filename is specified),
an IPython Image or Image popup - if show is True
or bytes otherwise
- Parameters:
sample
filename
show
img_type
value_detail
graphviz_path
args
kwargs
- Returns:
- draw_model(model, filename: str | None = None, show=True, img_type='png', value_detail: int = 0, graphviz_path: str | None = None, *args, **kwargs)[source]
- Draws model either as an image of type img_type either into:
a file - if filename is specified),
an IPython Image or Image popup - if show is True
or bytes otherwise
- Parameters:
model
filename
show
img_type
value_detail
graphviz_path
args
kwargs
- Returns:
- draw_sample(sample, filename: str | None = None, show=True, img_type='png', value_detail: int = 0, graphviz_path: str | None = None, *args, **kwargs)[source]
- Draws sample either as an image of type img_type either into:
a file - if filename is specified),
an IPython Image or Image popup - if show is True
or bytes otherwise
- Parameters:
sample
filename
show
img_type
value_detail
graphviz_path
show
args
kwargs
- Returns:
- get_drawing_settings(img_type: str = 'png', value_detail: int = 0, graphviz_path: str | None = None) SettingsProxy [source]
Returns the default settings instance for drawing with a specified image type.
- Parameters:
img_type
value_detail
graphviz_path
- Returns:
- get_grounding_drawer(settings: SettingsProxy)[source]
- get_sample_drawer(settings: SettingsProxy)[source]
- get_template_drawer(settings: SettingsProxy)[source]
- model_to_dot_source(model) str [source]
Renders the model into its dot source representation.
- Parameters:
model
- Returns: