MCPcopy Create free account
hub / github.com/NVlabs/DiffusionNFT / __init__

Method __init__

scripts/evaluation.py:59–64  ·  view source on GitHub ↗
(self, dataset_path, split="test")

Source from the content-addressed store, hash-verified

57
58class TextPromptDataset(Dataset):
59 def __init__(self, dataset_path, split="test"):
60 self.file_path = os.path.join(dataset_path, f"{split}.txt")
61 if not os.path.exists(self.file_path):
62 raise FileNotFoundError(f"Dataset file not found at {self.file_path}")
63 with open(self.file_path, "r") as f:
64 self.prompts = [line.strip() for line in f.readlines()]
65
66 def __len__(self):
67 return len(self.prompts)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected