forked from OhadRubin/SmBop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resume.py
executable file
·39 lines (29 loc) · 1.03 KB
/
resume.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
32
33
34
35
36
37
38
39
import comet_ml
from overrides.overrides import overrides
# import sklearn
# import torch
from sh import sed
import sh
# import allennlp
from allennlp.commands.train import train_model
from allennlp.common import Params
from dataset_readers.forest_spider import ForestSpiderDatasetReader
from models.semantic_parsing.smbop import SmbopParser
from modules.relation_transformer import RelationTransformer
from modules.lxmert import LxmertCrossAttentionLayer
from training.callbacks import PredictionLogger, PerformanceLogger
# from allennlp.common.params import with_fallback
import namegenerator
from allennlp.commands.train import train_model_from_file
serialization_dir = "/home/ohadr/experiments/crabby-auburn-catfish_gpu7"
parameter_filename = f"{serialization_dir}/config.json"
# params = Params.from_file(parameter_filename)
# params['trainer']['cuda_device']=4
# print("hi")
train_model_from_file(
parameter_filename=parameter_filename,
serialization_dir=serialization_dir,
recover=True,
)
# train_model(params,)
# train_mo