Skip to content

Commit d6eaf4e

Browse files
committed
Update comments mentioning Python 2.
1 parent 45841ea commit d6eaf4e

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

examples/contrib/run_swag.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def train(args, train_dataset, model, tokenizer):
341341
tr_loss, logging_loss = 0.0, 0.0
342342
model.zero_grad()
343343
train_iterator = trange(int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0])
344-
set_seed(args) # Added here for reproductibility (even between python 2 and 3)
344+
set_seed(args) # Added here for reproductibility
345345
for _ in train_iterator:
346346
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
347347
for step, batch in enumerate(epoch_iterator):

examples/distillation/run_squad_w_distillation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def train(args, train_dataset, model, tokenizer, teacher=None):
159159
tr_loss, logging_loss = 0.0, 0.0
160160
model.zero_grad()
161161
train_iterator = trange(int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0])
162-
set_seed(args) # Added here for reproductibility (even between python 2 and 3)
162+
set_seed(args) # Added here for reproductibility
163163
for _ in train_iterator:
164164
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
165165
for step, batch in enumerate(epoch_iterator):

examples/mm-imdb/run_mmimdb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def train(args, train_dataset, model, tokenizer, criterion):
164164
best_f1, n_no_improve = 0, 0
165165
model.zero_grad()
166166
train_iterator = trange(int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0])
167-
set_seed(args) # Added here for reproductibility (even between python 2 and 3)
167+
set_seed(args) # Added here for reproductibility
168168
for _ in train_iterator:
169169
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
170170
for step, batch in enumerate(epoch_iterator):

examples/run_glue.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def train(args, train_dataset, model, tokenizer):
185185
train_iterator = trange(
186186
epochs_trained, int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0]
187187
)
188-
set_seed(args) # Added here for reproductibility (even between python 2 and 3)
188+
set_seed(args) # Added here for reproductibility
189189
for _ in train_iterator:
190190
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
191191
for step, batch in enumerate(epoch_iterator):

examples/run_lm_finetuning.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def train(args, train_dataset, model, tokenizer):
281281
train_iterator = trange(
282282
epochs_trained, int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0]
283283
)
284-
set_seed(args) # Added here for reproducibility (even between python 2 and 3)
284+
set_seed(args) # Added here for reproducibility
285285
for _ in train_iterator:
286286
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
287287
for step, batch in enumerate(epoch_iterator):

examples/run_multiple_choice.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def train(args, train_dataset, model, tokenizer):
145145
best_steps = 0
146146
model.zero_grad()
147147
train_iterator = trange(int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0])
148-
set_seed(args) # Added here for reproductibility (even between python 2 and 3)
148+
set_seed(args) # Added here for reproductibility
149149
for _ in train_iterator:
150150
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
151151
for step, batch in enumerate(epoch_iterator):

examples/run_ner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def train(args, train_dataset, model, tokenizer, labels, pad_token_label_id):
169169
train_iterator = trange(
170170
epochs_trained, int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0]
171171
)
172-
set_seed(args) # Added here for reproductibility (even between python 2 and 3)
172+
set_seed(args) # Added here for reproductibility
173173
for _ in train_iterator:
174174
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
175175
for step, batch in enumerate(epoch_iterator):

examples/run_squad.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def train(args, train_dataset, model, tokenizer):
185185
train_iterator = trange(
186186
epochs_trained, int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0]
187187
)
188-
# Added here for reproductibility (even between python 2 and 3)
188+
# Added here for reproductibility
189189
set_seed(args)
190190

191191
for _ in train_iterator:

examples/run_xnli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def train(args, train_dataset, model, tokenizer):
164164
train_iterator = trange(
165165
epochs_trained, int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0]
166166
)
167-
set_seed(args) # Added here for reproductibility (even between python 2 and 3)
167+
set_seed(args) # Added here for reproductibility
168168
for _ in train_iterator:
169169
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
170170
for step, batch in enumerate(epoch_iterator):

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
creating the wheel and the source distribution (obviously).
1515
1616
For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
17-
(this will build a wheel for the python version you use to build it - make sure you use python 3.x).
17+
(this will build a wheel for the python version you use to build it).
1818
1919
For the sources, run: "python setup.py sdist"
2020
You should now have a /dist directory with both .whl and .tar.gz source versions.

templates/adding_a_new_example_script/run_xxx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def train(args, train_dataset, model, tokenizer):
155155
tr_loss, logging_loss = 0.0, 0.0
156156
model.zero_grad()
157157
train_iterator = trange(int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0])
158-
set_seed(args) # Added here for reproductibility (even between python 2 and 3)
158+
set_seed(args) # Added here for reproductibility
159159
for _ in train_iterator:
160160
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
161161
for step, batch in enumerate(epoch_iterator):

0 commit comments

Comments
 (0)