From 94a8177f04b2f545139a01188185ec7a46325bad Mon Sep 17 00:00:00 2001 From: Aurelius84 Date: Tue, 11 Apr 2023 09:36:53 +0800 Subject: [PATCH] [Dy2St]Ignore os as not to_static module (#52715) --- python/paddle/jit/dy2static/convert_call_func.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/paddle/jit/dy2static/convert_call_func.py b/python/paddle/jit/dy2static/convert_call_func.py index 2f0494551c8..d964bd633c1 100644 --- a/python/paddle/jit/dy2static/convert_call_func.py +++ b/python/paddle/jit/dy2static/convert_call_func.py @@ -17,6 +17,7 @@ import copy import functools import inspect import logging +import os import pdb import re from typing import Any, List @@ -79,13 +80,14 @@ def builtin_modules(): Return builtin modules. """ modules = [ - collections, - pdb, copy, + collections, inspect, - re, - numpy, logging, + numpy, + os, + pdb, + re, ] try: import six -- GitLab