fa0fea934bad76e9906c013e377ce80c77cbd5e4,pytext/trainers/hogwild_trainer.py,HogwildTrainer,train,#HogwildTrainer#Any#Any#Any#Any#Any#Any#Any#,35
Before Change
for rank in range(1, self.num_workers):
// Initialize the batches with different randome states.
train_iter.batches.init_epoch()
p = mp.Process(
target=self.real_trainer.train,
args=(
train_iter,
eval_iter,
model,
metric_reporter,
optimizers,
pytext_config,
scheduler,
None,
rank,
),
)
processes.append(p)
p.start()
training_result: List = Manager().list() // Actual type is ListProxy.
self.real_trainer.train(
train_iter,
After Change
for param in model.parameters():
param.share_memory_()
return super().train(
train_iter,
eval_iter,
model,
metric_reporter,
optimizers,
pytext_config,
scheduler,
)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: facebookresearch/pytext
Commit Name: fa0fea934bad76e9906c013e377ce80c77cbd5e4
Time: 2019-01-03
Author: geoffreygoh@fb.com
File Name: pytext/trainers/hogwild_trainer.py
Class Name: HogwildTrainer
Method Name: train
Project Name: uber/ludwig
Commit Name: 13eb6bf434f384c45ba1d92ad1dcda04fc6f0517
Time: 2020-08-22
Author: piero@uber.com
File Name: tests/integration_tests/test_collect.py
Class Name:
Method Name: _get_layers
Project Name: notify-run/notify.run
Commit Name: aad5ed3e98a37bc4de2d7833de37c6bb65b7969c
Time: 2019-05-12
Author: paulgb@gmail.com
File Name: server/notify_run_server/notify.py
Class Name:
Method Name: parallel_notify