From cb415a63795be1a610c3d9ed5ee6d0f077420792 Mon Sep 17 00:00:00 2001 From: malin10 Date: Fri, 8 May 2020 12:24:33 +0800 Subject: [PATCH] bug fix --- fleet_rec/core/trainers/single_trainer.py | 4 ++++ fleet_rec/core/trainers/transpiler_trainer.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fleet_rec/core/trainers/single_trainer.py b/fleet_rec/core/trainers/single_trainer.py index 9cf97082..040334fc 100644 --- a/fleet_rec/core/trainers/single_trainer.py +++ b/fleet_rec/core/trainers/single_trainer.py @@ -122,6 +122,10 @@ class SingleTrainer(TranspileTrainer): with fluid.program_guard(infer_program, startup_program): self.model.infer_net() + if self.model._infer_data_loader is None: + context['status'] = 'terminal_pass' + return + reader = self._get_dataloader("Evaluate") metrics_varnames = [] diff --git a/fleet_rec/core/trainers/transpiler_trainer.py b/fleet_rec/core/trainers/transpiler_trainer.py index eb7d8b0b..84bf3f89 100644 --- a/fleet_rec/core/trainers/transpiler_trainer.py +++ b/fleet_rec/core/trainers/transpiler_trainer.py @@ -102,8 +102,8 @@ class TranspileTrainer(Trainer): if not need_save(epoch_id, save_interval, False): return - # print("save inference model is not supported now.") - # return + print("save inference model is not supported now.") + return feed_varnames = envs.get_global_env("save.inference.feed_varnames", None, namespace) fetch_varnames = envs.get_global_env("save.inference.fetch_varnames", None, namespace) -- GitLab