Upload folder using huggingface_hub
Browse files
utils/__pycache__/dataset_verbonly.cpython-39.pyc
CHANGED
Binary files a/utils/__pycache__/dataset_verbonly.cpython-39.pyc and b/utils/__pycache__/dataset_verbonly.cpython-39.pyc differ
|
|
utils/dataset_verbonly.py
CHANGED
@@ -114,6 +114,7 @@ class RefDataset(Dataset):
|
|
114 |
self.length = info[dataset][split]
|
115 |
self.env = None
|
116 |
|
|
|
117 |
self.exclude_position = args.exclude_pos
|
118 |
self.metric_learning = args.metric_learning
|
119 |
self.exclude_multiobj = args.exclude_multiobj
|
@@ -135,20 +136,20 @@ class RefDataset(Dataset):
|
|
135 |
if not self.exclude_multiobj and not self.exclude_position :
|
136 |
return None
|
137 |
elif self.exclude_position:
|
138 |
-
multiobj_path = '
|
139 |
elif self.exclude_multiobj :
|
140 |
-
multiobj_path = '
|
141 |
with open(multiobj_path, 'r') as f:
|
142 |
return [int(line.strip()) for line in f.readlines()]
|
143 |
|
144 |
def _load_metadata(self):
|
145 |
# Load metadata for hard positive verb phrases, hard negative queries
|
146 |
if 'op2' in self.metric_mode :
|
147 |
-
hardpos_path = '
|
148 |
else :
|
149 |
-
hardpos_path = '
|
150 |
# do not use hardneg_path
|
151 |
-
hardneg_path = '
|
152 |
|
153 |
with open(hardpos_path, 'r', encoding='utf-8') as f:
|
154 |
hardpos_json = json.load(f)
|
|
|
114 |
self.length = info[dataset][split]
|
115 |
self.env = None
|
116 |
|
117 |
+
self.ROOT = '/shared/s1/lab09/chaeyun/VRIS'
|
118 |
self.exclude_position = args.exclude_pos
|
119 |
self.metric_learning = args.metric_learning
|
120 |
self.exclude_multiobj = args.exclude_multiobj
|
|
|
136 |
if not self.exclude_multiobj and not self.exclude_position :
|
137 |
return None
|
138 |
elif self.exclude_position:
|
139 |
+
multiobj_path = os.path.join(self.ROOT, 'multiobj_ov2_nopos.txt')
|
140 |
elif self.exclude_multiobj :
|
141 |
+
multiobj_path = os.path.join(self.ROOT, 'multiobj_ov3.txt')
|
142 |
with open(multiobj_path, 'r') as f:
|
143 |
return [int(line.strip()) for line in f.readlines()]
|
144 |
|
145 |
def _load_metadata(self):
|
146 |
# Load metadata for hard positive verb phrases, hard negative queries
|
147 |
if 'op2' in self.metric_mode :
|
148 |
+
hardpos_path = os.path.join(self.ROOT, 'hardpos_verbphrase_op2_1024upd.json')
|
149 |
else :
|
150 |
+
hardpos_path = os.path.join(self.ROOT, 'hardpos_verbphrase_0906upd.json')
|
151 |
# do not use hardneg_path
|
152 |
+
hardneg_path = os.path.join(self.ROOT, 'hardneg_verb.json')
|
153 |
|
154 |
with open(hardpos_path, 'r', encoding='utf-8') as f:
|
155 |
hardpos_json = json.load(f)
|