Skip to content

Commit

Permalink
🩹 update generate_every_graphs()
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanBilot committed Apr 7, 2022
1 parent f6b61e8 commit 05e1e52
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions phishGNN/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,15 @@ def generate_every_graphs():
for every example in the dataset (based on the files
in data/processed).
"""
path = os.path.join(os.getcwd(), "data")
path = os.path.join(os.getcwd(), "data", "train")
data_files = sorted(glob.glob(os.path.join(path, "processed", "data_viz*")))
use_process = False

if not os.path.exists(path) or len(data_files) == 0:
print(f"Warning: no data files found in {path}, processing the dataset...")
raw_files = sorted(glob.glob(os.path.join(path, "raw", "*")))
if len(raw_files) == 0:
raise FileNotFoundError(f"No csv raw files found in {os.path.join(path, 'raw')}")
print(f"{len(raw_files)} file(s) found in {os.path.join(path, 'raw')}")
use_process = True
print(f"No csv raw files found in {path}")

dataset = PhishingDataset(
root=path,
use_process=use_process,
use_process=False,
visulization_mode=True,
)
dataset = dataset.shuffle()
Expand Down

0 comments on commit 05e1e52

Please sign in to comment.