-
Notifications
You must be signed in to change notification settings - Fork 3
/
server_train.py
31 lines (26 loc) · 974 Bytes
/
server_train.py
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
from neptune.parser import parse_args
from neptune.callbacks import visualization_callback
from neptune.trainers.metrics import MetricsLogger
from neptune.trainers import Trainer
import jax
def main():
print('NUMBER OF LOCAL CUDA VISIBLE DEVICES', jax.local_device_count())
model_cfg, training_cfg, dataset_cfg, pde = parse_args()
cb = [visualization_callback]
end_cb = []
logger = MetricsLogger(project='MoE',
pde=pde,
keys=[],
model_args=model_cfg,
train_args=training_cfg,
data_config=dataset_cfg)
trainer = Trainer(model_cfg,
dataset_cfg,
training_cfg,
pde=pde,
logger=logger,
callbacks=cb,
finish_callbacks=end_cb)
trainer.train()
if __name__ == '__main__':
main()