Cai-causal-graph

Latest version: v0.5.8

Safety actively analyzes 710445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 10

0.5.2

- Removed caching from `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.get_minimal_graph`,
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.get_stationary_graph` and
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.get_summary_graph` because the caching would not
account for changes in node/edge metadata.

0.5.1

- Improved caching of results for `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` class, including:
- Adding caching to the following methods: `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.get_minimal_graph`, `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.is_minimal_graph`,
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.is_stationary_graph`.
- Fixed a bug in `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.get_stationary_graph` where the same cached graph would be returned multiple times. Instead now,
a deepcopied version of this graph is returned.
- Fixed a bug where cached attributes would not be reset when adding edges to `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph`, which can lead to erroneous
stationary graphs being returned.
- Added caching of `cai_causal_graph.causal_graph.CausalGraph.is_dag`, `cai_causal_graph.causal_graph.CausalGraph.adjacency_matrix` and `cai_causal_graph.causal_graph.CausalGraph.to_networkx`
methods.
- Unified cached attribute resetting between `cai_causal_graph.causal_graph.CausalGraph` and `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph`
by introducing a `cai_causal_graph.causal_graph.CausalGraph._reset_cached_attributes` method and `cai_causal_graph.causal_graph.reset_cached_attributes_decorator`
decorator.
- Fixed a bug where calling `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.variables` method would return the variable list by reference, rather than returning
a copy.

0.5.0

> **_NOTE:_** **Backwards compatibility warning!** Global metadata to `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph`
> and `cai_causal_graph.causal_graph.CausalGraph`, which means their serialized state has changed.

> **_NOTE:_** **Backwards compatibility warning!** The default value of the `include_all_parents` argument to `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.extend_graph`
> has been changed to `True` (from `False`).

- The default value of the `include_all_parents` argument to `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.extend_graph`
has been changed to `True` (from `False`).
- Added metadata handling system to the `cai_causal_graph.interfaces.HasMetadata` class. All extending classes should use
this system to parse and set their metadata.
- Added `cai_causal_graph.graph_components.TimeSeriesEdge` class, which is used as an edge class by `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph`.
- Added metadata to `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` and `cai_causal_graph.causal_graph.CausalGraph`.
- Ensured consistent metadata handling. Metadata passed at construction to `cai_causal_graph.graph_components.TimeSeriesNode`,
`cai_causal_graph.graph_components.Node`, `cai_causal_graph.graph_components.TimeSeriesEdge`, `cai_causal_graph.graph_components.Edge`,
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` and `cai_causal_graph.causal_graph.CausalGraph` is shallow-copied. Any
metadata is deepcopied when constructing `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph` and `cai_causal_graph.causal_graph.CausalGraph`
from dictionary.
- Ensured that `cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.replace_node` performs similarly to
`cai_causal_graph.causal_graph.CausalGraph.replace_node`, meaning that if any additional information (such as metadata)
is specified, it is used to overwrite corresponding information in the constructed node.
- Generalized `cai_causal_graph.causal_graph.CausalGraph.__eq__` to check for the class of the instance itself, enabling
to reuse this method by extending classes.
- Added `cai_causal_graph.causal_graph.CausalGraph.has_non_serializable_metadata` method, which returns `False` by default.
- Extended the string representation (`repr`) of `cai_causal_graph.causal_graph.CausalGraph` to include whether the
graph instance is a directed acyclic graph (DAG).
- Dropped support for `python` `3.8` as it is approaching end of life.

0.4.10

- Improved documentation by cleaning up a few syntax issues to support the new docs building process.

0.4.9

- Fixed a bug where metadata on floating nodes would not be correctly carried over to the minimal graph when calling
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.get_minimal_graph`. This also fixes an issue where
`cai_causal_graph.time_series_causal_graph.TimeSeriesCausalGraph.is_minimal_graph` could return `False` on minimal
graphs that contain floating nodes.

0.4.8

- Upgraded `docs-builder` dependency to `"~0.2.1"` in the Makefile and updated syntax to support newer `poetry`.

Page 2 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.