From 1593ee2575e3edff40f4a1107b799f78f2d3971f Mon Sep 17 00:00:00 2001 From: xiemoyuan <71377852+xiemoyuan@users.noreply.github.com> Date: Wed, 21 Apr 2021 08:40:01 +0800 Subject: [PATCH] remove fluid for auto_checkpoint. (#32157) * remove fluid for auto_checkpoint. * fix bug. --- python/paddle/incubate/__init__.py | 2 ++ python/paddle/incubate/checkpoint/__init__.py | 17 +++++++++++++++++ python/setup.py.in | 1 + 3 files changed, 20 insertions(+) create mode 100644 python/paddle/incubate/checkpoint/__init__.py diff --git a/python/paddle/incubate/__init__.py b/python/paddle/incubate/__init__.py index 662515f0e52..bf13ff32ca0 100644 --- a/python/paddle/incubate/__init__.py +++ b/python/paddle/incubate/__init__.py @@ -13,9 +13,11 @@ # limitations under the License. from . import optimizer +from . import checkpoint from ..fluid.contrib import reader from ..fluid.layer_helper import LayerHelper __all__ = [] __all__ += ["reader"] __all__ += optimizer.__all__ +__all__ += checkpoint.__all__ diff --git a/python/paddle/incubate/checkpoint/__init__.py b/python/paddle/incubate/checkpoint/__init__.py new file mode 100644 index 00000000000..7ddd256df74 --- /dev/null +++ b/python/paddle/incubate/checkpoint/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ...fluid.incubate.checkpoint import auto_checkpoint + +__all__ = ["auto_checkpoint"] diff --git a/python/setup.py.in b/python/setup.py.in index fae860464fb..0d6a5c101cc 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -145,6 +145,7 @@ packages=['paddle', 'paddle.distributed', 'paddle.incubate', 'paddle.incubate.optimizer', + 'paddle.incubate.checkpoint', 'paddle.distributed.fleet', 'paddle.distributed.fleet.base', 'paddle.distributed.fleet.meta_optimizers', -- GitLab