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

Method __init__

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

Source from the content-addressed store, hash-verified

72
73class GenevalPromptDataset(Dataset):
74 def __init__(self, dataset_path, split="test"):
75 self.file_path = os.path.join(dataset_path, f"{split}_metadata.jsonl")
76 if not os.path.exists(self.file_path):
77 raise FileNotFoundError(f"Dataset file not found at {self.file_path}")
78 with open(self.file_path, "r", encoding="utf-8") as f:
79 self.metadatas = [json.loads(line) for line in f]
80 self.prompts = [item["prompt"] for item in self.metadatas]
81
82 def __len__(self):
83 return len(self.prompts)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected