From bb1596b8c397f847e8978e9fbfb6b0d44be2a9e2 Mon Sep 17 00:00:00 2001 From: Tingquan Gao Date: Thu, 20 Jul 2023 10:50:52 +0800 Subject: [PATCH] compatibility with python 3.11 (#2878) --- ppcls/optimizer/optimizer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ppcls/optimizer/optimizer.py b/ppcls/optimizer/optimizer.py index a91b57c7..8e4ca9e9 100644 --- a/ppcls/optimizer/optimizer.py +++ b/ppcls/optimizer/optimizer.py @@ -17,6 +17,9 @@ from __future__ import division from __future__ import print_function import inspect +# for python3.11 +if not hasattr(inspect, 'getargspec'): + inspect.getargspec = inspect.getfullargspec from paddle import optimizer as optim from ppcls.utils import logger -- GitLab