From f8369f476ac17f53d27a1d08e5d623a47233e2ab Mon Sep 17 00:00:00 2001 From: chengmo Date: Thu, 7 May 2020 00:00:23 +0800 Subject: [PATCH] fix cluster --- fleet_rec/core/trainers/cluster_trainer.py | 2 +- fleet_rec/core/trainers/tdm_cluster_trainer.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fleet_rec/core/trainers/cluster_trainer.py b/fleet_rec/core/trainers/cluster_trainer.py index 06f3a603..4d47a4e0 100644 --- a/fleet_rec/core/trainers/cluster_trainer.py +++ b/fleet_rec/core/trainers/cluster_trainer.py @@ -103,7 +103,7 @@ class ClusterTrainer(TranspileTrainer): self._exe.run(fleet.startup_program) context['status'] = 'train_pass' - def dataloader_train(self, context): + def dataloader_train(self, context): fleet.init_worker() reader = self._get_dataloader() diff --git a/fleet_rec/core/trainers/tdm_cluster_trainer.py b/fleet_rec/core/trainers/tdm_cluster_trainer.py index 2b87b3c8..40a46d92 100644 --- a/fleet_rec/core/trainers/tdm_cluster_trainer.py +++ b/fleet_rec/core/trainers/tdm_cluster_trainer.py @@ -19,6 +19,7 @@ Training use fluid with one node only. from __future__ import print_function import logging +import numpy as np import paddle.fluid as fluid from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler import fleet from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler.distributed_strategy import StrategyFactory -- GitLab