Skip to content

Commit 78ad0b7

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e97d55f commit 78ad0b7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/llm/txt2kg_rag.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import argparse
22
import gc
33
import json
4+
import multiprocessing as mp
45
import os
56
import random
67
import re
@@ -9,7 +10,6 @@
910
from glob import glob
1011
from itertools import chain
1112
from pathlib import Path
12-
import multiprocessing as mp
1313

1414
import yaml
1515

@@ -444,7 +444,8 @@ def process_qa_chunk(chunk_data):
444444

445445
# Load graph and feature stores with unique path for each GPU
446446
from torch_geometric.utils.rag.backend_utils import (
447-
create_remote_backend_from_graph_data, )
447+
create_remote_backend_from_graph_data,
448+
)
448449
backend_path = f"backend_gpu_{gpu_id}"
449450
fs, gs = create_remote_backend_from_graph_data(
450451
graph_data=graph_data, path=backend_path,
@@ -945,4 +946,4 @@ def eval(question: str, pred: str, correct_answer: str):
945946
drop_last=False, pin_memory=True, shuffle=False)
946947

947948
model = train(args, train_loader, val_loader)
948-
test(model, test_loader, args)
949+
test(model, test_loader, args)

0 commit comments

Comments
 (0)