Skip to content

Commit 122cd4c

Browse files
Merge branch 'feature/vqa-pipeline' of https://github.com/open-sciencelab/GraphGen into feature/vqa-pipeline
2 parents 22aae9a + 3ee98a9 commit 122cd4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graphgen/models/partitioner/anchor_bfs_partitioner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def _pick_anchor_ids(
101101

102102
anchor_ids: Set[str] = set()
103103
for node_id, meta in nodes:
104-
node_type = str(meta.get("entity_type") or "").lower()
104+
node_type = str(meta.get("entity_type", "")).lower()
105105
if self.anchor_type.lower() in node_type:
106106
anchor_ids.add(node_id)
107107
return anchor_ids

graphgen/models/reader/csv_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def read(self, file_path: str) -> List[Dict[str, Any]]:
1010

1111
df = pd.read_csv(file_path)
1212
for _, row in df.iterrows():
13-
if row.get("type") == "text" and self.text_column not in row:
13+
if "type" in row and row["type"] == "text" and self.text_column not in row:
1414
raise ValueError(
1515
f"Missing '{self.text_column}' in document: {row.to_dict()}"
1616
)

0 commit comments

Comments
 (0)