From 391c2e4896804fd98d99809af3941562caf705c2 Mon Sep 17 00:00:00 2001 From: Paul Andrey <paul.andrey@inria.fr> Date: Fri, 26 Jul 2024 10:38:50 +0200 Subject: [PATCH] Fix 'messaging' imports under 'training' module. --- declearn/training/_manager.py | 2 +- declearn/training/dp/_manager.py | 2 +- test/training/test_train_manager.py | 2 +- test/training/test_train_manager_dp.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/declearn/training/_manager.py b/declearn/training/_manager.py index a3d158f..bfe21be 100644 --- a/declearn/training/_manager.py +++ b/declearn/training/_manager.py @@ -23,8 +23,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np import tqdm +from declearn import messaging from declearn.aggregator import Aggregator -from declearn.communication import messaging from declearn.dataset import Dataset from declearn.metrics import ( MeanMetric, diff --git a/declearn/training/dp/_manager.py b/declearn/training/dp/_manager.py index 26aa224..291bea8 100644 --- a/declearn/training/dp/_manager.py +++ b/declearn/training/dp/_manager.py @@ -23,8 +23,8 @@ from typing import List, Optional, Tuple, Union from opacus.accountants import IAccountant, create_accountant # type: ignore from opacus.accountants.utils import get_noise_multiplier # type: ignore +from declearn import messaging from declearn.aggregator import Aggregator -from declearn.communication import messaging from declearn.dataset import Dataset from declearn.metrics import MetricInputType, MetricSet from declearn.model.api import Model diff --git a/test/training/test_train_manager.py b/test/training/test_train_manager.py index 271c2a1..f59ae5b 100644 --- a/test/training/test_train_manager.py +++ b/test/training/test_train_manager.py @@ -22,8 +22,8 @@ from typing import Any, Iterator, Optional import numpy +from declearn import messaging from declearn.aggregator import Aggregator -from declearn.communication import messaging from declearn.dataset import Dataset from declearn.metrics import Metric, MetricSet from declearn.model.api import Model, Vector diff --git a/test/training/test_train_manager_dp.py b/test/training/test_train_manager_dp.py index 01c62d7..83edd26 100644 --- a/test/training/test_train_manager_dp.py +++ b/test/training/test_train_manager_dp.py @@ -28,7 +28,7 @@ try: except ModuleNotFoundError: pytest.skip("Opacus is unavailable", allow_module_level=True) -from declearn.communication import messaging +from declearn import messaging from declearn.dataset import DataSpecs from declearn.optimizer.modules import GaussianNoiseModule from declearn.training.dp import DPTrainingManager -- GitLab