Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

review: fix syntax errors in arrow_exporter.py and add parquet to unified export

KaifAhmad1a735cc053872
diff --git a/semantica/export/arrow_exporter.py b/semantica/export/arrow_exporter.py
index d2e3a4d1..020c2d05 100644
--- a/semantica/export/arrow_exporter.py
+++ b/semantica/export/arrow_exporter.py
@@ -376,12 +376,10 @@ class ArrowExporter:
try:
confidence = float(confidence)
except (TypeError, ValueError):
- msg = (
self.logger.warning(
f"Invalid confidence value for entity {i}: "
f"{confidence}. Setting to None."
)
- self.logger.warning(msg)
confidence = None
# Convert start/end to int
@@ -485,12 +483,10 @@ class ArrowExporter:
try:
confidence = float(confidence)
except (TypeError, ValueError):
- msg = (
self.logger.warning(
f"Invalid confidence value for relationship {i}: "
f"{confidence}. Setting to None."
)
- self.logger.warning(msg)
confidence = None
# Convert metadata dict to Arrow struct
diff --git a/semantica/export/methods.py b/semantica/export/methods.py
index 8fafc9af..7751c7e6 100644
--- a/semantica/export/methods.py
+++ b/semantica/export/methods.py
@@ -853,6 +853,7 @@ def export_knowledge_graph(
".owl": "owl-xml",
".cypher": "cypher",
".aql": "aql",
+ ".parquet": "parquet",
}
format = format_map.get(ext, "json")
@@ -873,6 +874,8 @@ def export_knowledge_graph(
export_lpg(knowledge_graph, file_path, method=method, **kwargs)
elif format == "aql":
export_arango(knowledge_graph, file_path, method=method, **kwargs)
+ elif format == "parquet":
+ export_parquet(knowledge_graph, file_path, method=method, **kwargs)
else:
raise ProcessingError(f"Unknown export format: {format}")