fix load model schedule error, config optional. (#3008)

pull/3040/head
zxcd 2 years ago committed by GitHub
parent 30e546c7b6
commit 5186319f48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -591,7 +591,7 @@ class Wav2Vec2ASRTrainer(Trainer):
def setup_dataloader(self):
config = self.config.clone()
self.use_streamdata = config.get("use_stream_data", False)
self.use_sb = config.use_sb_pipeline
self.use_sb = config.get("use_sb_pipeline", False)
if self.use_sb:
hparams_file = config.sb_pipeline_conf
with open(hparams_file, 'r', encoding='utf8') as fin:

@ -220,7 +220,6 @@ class NewBobScheduler(LRScheduler):
def load(self, data):
"""Loads the needed information."""
data = paddle.load(data)
self.last_epoch = data["current_epoch_index"]
self.hyperparam_value = data["hyperparam_value"]
self.metric_values = data["metric_values"]

Loading…
Cancel
Save