Skip to content

Commit

Permalink
fix some usage
Browse files Browse the repository at this point in the history
  • Loading branch information
gsq7474741 committed Nov 28, 2022
1 parent 50f69b7 commit 6eaf980
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions python/paddle/fluid/tests/unittests/test_paddle_save_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import unittest
import numpy as np
import os
import sys
from io import BytesIO
import tempfile

Expand Down Expand Up @@ -149,9 +148,7 @@ def test_pickle_protocol(self):
with self.assertRaises(ValueError):
paddle.save(save_dict, path, 5)

protocols = [
2, 3, 4
]
protocols = [2, 3, 4]
for protocol in protocols:
paddle.save(save_dict, path, pickle_protocol=protocol)
dict_load = paddle.load(path)
Expand Down
5 changes: 1 addition & 4 deletions python/paddle/fluid/tests/unittests/test_static_save_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

import unittest
import paddle
Expand Down Expand Up @@ -1798,9 +1797,7 @@ def test_pickle_protocol(self):
with self.assertRaises(ValueError):
paddle.fluid.save(prog, path, 5)

protocols = [
2, 3, 4
]
protocols = [2, 3, 4]
for protocol in protocols:
paddle.fluid.save(prog, path, protocol)
# set var to zero
Expand Down

0 comments on commit 6eaf980

Please sign in to comment.