File size: 36,880 Bytes
4014562
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
wandb: WARNING Serializing object of type dict that is 589920 bytes
wandb: WARNING Serializing object of type dict that is 589920 bytes
  0%|                                                                                                                                         | 0/70340 [00:00<?, ?it/s]
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
	- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
	- Avoid using `tokenizers` before the fork if possible
  0%|                                                                                                                                         | 0/70340 [00:00<?, ?it/s]/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/data/data_collator.py:132: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ../torch/csrc/utils/tensor_new.cpp:210.)
  batch[k] = torch.tensor([f[k] for f in features])
Traceback (most recent call last):
  File "/n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/main.py", line 598, in <module>
  File "/n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/main.py", line 513, in main
    data_args.max_train_samples if data_args.max_train_samples is not None else len(train_dataset)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/trainer.py", line 1409, in train
    return inner_training_loop(
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/trainer.py", line 1651, in _inner_training_loop
    tr_loss_step = self.training_step(model, inputs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/trainer.py", line 2349, in training_step
    loss = self.compute_loss(model, inputs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/trainer.py", line 2381, in compute_loss
    outputs = model(**inputs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/parallel/data_parallel.py", line 168, in forward
    outputs = self.parallel_apply(replicas, inputs, kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/parallel/data_parallel.py", line 178, in parallel_apply
    return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply
    output.reraise()
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/_utils.py", line 457, in reraise
    raise exception
RuntimeError: Caught RuntimeError in replica 0 on device 0.
Original Traceback (most recent call last):
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker
    output = module(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/src/models.py", line 459, in forward
  File "/n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/src/models.py", line 247, in coil_forward
    lab_reps = self.tok_proj(outputs_lab.last_hidden_state @ self.label_projection.weight)  # Q * LQ * d
  File "/n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/src/models.py", line 399, in forward_label_embeddings
    desc_attention_mask: Optional[List[int]] = None,
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 1018, in forward
    encoder_outputs = self.encoder(
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 607, in forward
    layer_outputs = layer_module(
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 493, in forward
    self_attention_outputs = self.attention(
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 423, in forward
    self_outputs = self.self(
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 355, in forward
    attention_probs = self.dropout(attention_probs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/dropout.py", line 58, in forward
    return F.dropout(input, self.p, self.training, self.inplace)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/functional.py", line 1279, in dropout
    return _VF.dropout_(input, p, training) if inplace else _VF.dropout(input, p, training)
RuntimeError: CUDA out of memory. Tried to allocate 782.00 MiB (GPU 0; 10.76 GiB total capacity; 3.28 GiB already allocated; 61.69 MiB free; 3.65 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ /n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/main.py:598 in <module>                               โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   595 โ”‚   main()                                                                                 โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/main.py:513 in main                                   โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   510 โ”‚   โ”‚   train_result = trainer.train(resume_from_checkpoint=checkpoint)                    โ”‚
โ”‚   511 โ”‚   โ”‚   metrics = train_result.metrics                                                     โ”‚
โ”‚   512 โ”‚   โ”‚   max_train_samples = (                                                              โ”‚
โ”‚ โฑ 513 โ”‚   โ”‚   โ”‚   data_args.max_train_samples if data_args.max_train_samples is not None else    โ”‚
โ”‚   514 โ”‚   โ”‚   )                                                                                  โ”‚
โ”‚   515 โ”‚   โ”‚   metrics["train_samples"] = min(max_train_samples, len(train_dataset))              โ”‚
โ”‚   516                                                                                            โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/trainer.py:1409 in train   โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   1406 โ”‚   โ”‚   inner_training_loop = find_executable_batch_size(                                 โ”‚
โ”‚   1407 โ”‚   โ”‚   โ”‚   self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size  โ”‚
โ”‚   1408 โ”‚   โ”‚   )                                                                                 โ”‚
โ”‚ โฑ 1409 โ”‚   โ”‚   return inner_training_loop(                                                       โ”‚
โ”‚   1410 โ”‚   โ”‚   โ”‚   args=args,                                                                    โ”‚
โ”‚   1411 โ”‚   โ”‚   โ”‚   resume_from_checkpoint=resume_from_checkpoint,                                โ”‚
โ”‚   1412 โ”‚   โ”‚   โ”‚   trial=trial,                                                                  โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/trainer.py:1651 in         โ”‚
โ”‚ _inner_training_loop                                                                             โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   1648 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   with model.no_sync():                                                 โ”‚
โ”‚   1649 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   tr_loss_step = self.training_step(model, inputs)                  โ”‚
โ”‚   1650 โ”‚   โ”‚   โ”‚   โ”‚   else:                                                                     โ”‚
โ”‚ โฑ 1651 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   tr_loss_step = self.training_step(model, inputs)                      โ”‚
โ”‚   1652 โ”‚   โ”‚   โ”‚   โ”‚                                                                             โ”‚
โ”‚   1653 โ”‚   โ”‚   โ”‚   โ”‚   if (                                                                      โ”‚
โ”‚   1654 โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   args.logging_nan_inf_filter                                           โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/trainer.py:2349 in         โ”‚
โ”‚ training_step                                                                                    โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   2346 โ”‚   โ”‚   โ”‚   return loss_mb.reduce_mean().detach().to(self.args.device)                    โ”‚
โ”‚   2347 โ”‚   โ”‚                                                                                     โ”‚
โ”‚   2348 โ”‚   โ”‚   with self.compute_loss_context_manager():                                         โ”‚
โ”‚ โฑ 2349 โ”‚   โ”‚   โ”‚   loss = self.compute_loss(model, inputs)                                       โ”‚
โ”‚   2350 โ”‚   โ”‚                                                                                     โ”‚
โ”‚   2351 โ”‚   โ”‚   if self.args.n_gpu > 1:                                                           โ”‚
โ”‚   2352 โ”‚   โ”‚   โ”‚   loss = loss.mean()  # mean() to average on multi-gpu parallel training        โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/trainer.py:2381 in         โ”‚
โ”‚ compute_loss                                                                                     โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   2378 โ”‚   โ”‚   โ”‚   labels = inputs.pop("labels")                                                 โ”‚
โ”‚   2379 โ”‚   โ”‚   else:                                                                             โ”‚
โ”‚   2380 โ”‚   โ”‚   โ”‚   labels = None                                                                 โ”‚
โ”‚ โฑ 2381 โ”‚   โ”‚   outputs = model(**inputs)                                                         โ”‚
โ”‚   2382 โ”‚   โ”‚   # Save past state if it exists                                                    โ”‚
โ”‚   2383 โ”‚   โ”‚   # TODO: this needs to be fixed and made cleaner later.                            โ”‚
โ”‚   2384 โ”‚   โ”‚   if self.args.past_index >= 0:                                                     โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py:1110 in      โ”‚
โ”‚ _call_impl                                                                                       โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   1107 โ”‚   โ”‚   # this function, and just call forward.                                           โ”‚
โ”‚   1108 โ”‚   โ”‚   if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks o  โ”‚
โ”‚   1109 โ”‚   โ”‚   โ”‚   โ”‚   or _global_forward_hooks or _global_forward_pre_hooks):                   โ”‚
โ”‚ โฑ 1110 โ”‚   โ”‚   โ”‚   return forward_call(*input, **kwargs)                                         โ”‚
โ”‚   1111 โ”‚   โ”‚   # Do not call functions when jit is used                                          โ”‚
โ”‚   1112 โ”‚   โ”‚   full_backward_hooks, non_full_backward_hooks = [], []                             โ”‚
โ”‚   1113 โ”‚   โ”‚   if self._backward_hooks or _global_backward_hooks:                                โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/parallel/data_parallel.py:168  โ”‚
โ”‚ in forward                                                                                       โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   165 โ”‚   โ”‚   โ”‚   if len(self.device_ids) == 1:                                                  โ”‚
โ”‚   166 โ”‚   โ”‚   โ”‚   โ”‚   return self.module(*inputs[0], **kwargs[0])                                โ”‚
โ”‚   167 โ”‚   โ”‚   โ”‚   replicas = self.replicate(self.module, self.device_ids[:len(inputs)])          โ”‚
โ”‚ โฑ 168 โ”‚   โ”‚   โ”‚   outputs = self.parallel_apply(replicas, inputs, kwargs)                        โ”‚
โ”‚   169 โ”‚   โ”‚   โ”‚   return self.gather(outputs, self.output_device)                                โ”‚
โ”‚   170 โ”‚                                                                                          โ”‚
โ”‚   171 โ”‚   def replicate(self, module, device_ids):                                               โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/parallel/data_parallel.py:178  โ”‚
โ”‚ in parallel_apply                                                                                โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   175 โ”‚   โ”‚   return scatter_kwargs(inputs, kwargs, device_ids, dim=self.dim)                    โ”‚
โ”‚   176 โ”‚                                                                                          โ”‚
โ”‚   177 โ”‚   def parallel_apply(self, replicas, inputs, kwargs):                                    โ”‚
โ”‚ โฑ 178 โ”‚   โ”‚   return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])   โ”‚
โ”‚   179 โ”‚                                                                                          โ”‚
โ”‚   180 โ”‚   def gather(self, outputs, output_device):                                              โ”‚
โ”‚   181 โ”‚   โ”‚   return gather(outputs, output_device, dim=self.dim)                                โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/parallel/parallel_apply.py:86  โ”‚
โ”‚ in parallel_apply                                                                                โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   83 โ”‚   for i in range(len(inputs)):                                                            โ”‚
โ”‚   84 โ”‚   โ”‚   output = results[i]                                                                 โ”‚
โ”‚   85 โ”‚   โ”‚   if isinstance(output, ExceptionWrapper):                                            โ”‚
โ”‚ โฑ 86 โ”‚   โ”‚   โ”‚   output.reraise()                                                                โ”‚
โ”‚   87 โ”‚   โ”‚   outputs.append(output)                                                              โ”‚
โ”‚   88 โ”‚   return outputs                                                                          โ”‚
โ”‚   89                                                                                             โ”‚
โ”‚                                                                                                  โ”‚
โ”‚ /n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/_utils.py:457 in reraise          โ”‚
โ”‚                                                                                                  โ”‚
โ”‚   454 โ”‚   โ”‚   โ”‚   # If the exception takes multiple arguments, don't try to                      โ”‚
โ”‚   455 โ”‚   โ”‚   โ”‚   # instantiate since we don't know how to                                       โ”‚
โ”‚   456 โ”‚   โ”‚   โ”‚   raise RuntimeError(msg) from None                                              โ”‚
โ”‚ โฑ 457 โ”‚   โ”‚   raise exception                                                                    โ”‚
โ”‚   458                                                                                            โ”‚
โ”‚   459                                                                                            โ”‚
โ”‚   460 def _get_available_device_type():                                                          โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
RuntimeError: Caught RuntimeError in replica 0 on device 0.
Original Traceback (most recent call last):
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker
    output = module(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/src/models.py", line 459, in forward
  File "/n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/src/models.py", line 247, in coil_forward
    lab_reps = self.tok_proj(outputs_lab.last_hidden_state @ self.label_projection.weight)  # Q * LQ * d
  File "/n/fs/nlp-pranjal/SemSup-LMLC/cleaned_code/src/models.py", line 399, in forward_label_embeddings
    desc_attention_mask: Optional[List[int]] = None,
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 1018, in forward
    encoder_outputs = self.encoder(
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 607, in forward
    layer_outputs = layer_module(
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 493, in forward
    self_attention_outputs = self.attention(
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 423, in forward
    self_outputs = self.self(
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py", line 355, in forward
    attention_probs = self.dropout(attention_probs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/modules/dropout.py", line 58, in forward
    return F.dropout(input, self.p, self.training, self.inplace)
  File "/n/fs/nlp-pranjal/miniconda3/lib/python3.9/site-packages/torch/nn/functional.py", line 1279, in dropout
    return _VF.dropout_(input, p, training) if inplace else _VF.dropout(input, p, training)
RuntimeError: CUDA out of memory. Tried to allocate 782.00 MiB (GPU 0; 10.76 GiB total capacity; 3.28 GiB already allocated; 61.69 MiB free; 3.65 GiB reserved in total
by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and
PYTORCH_CUDA_ALLOC_CONF