Skip to content

Commit

Permalink
[Dy2st]Fix Exception in utils.py function "is_paddle_module" (#40243)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x45f authored Mar 9, 2022
1 parent cd28cdd commit 0604df9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/paddle/fluid/dygraph/dygraph_to_static/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def is_api_in_module(node, module_prefix):

return eval("_is_api_in_module_helper({}, '{}')".format(func_str,
module_prefix))
except NameError:
except Exception:
return False


Expand Down Expand Up @@ -227,7 +227,7 @@ def is_numpy_api(node):
# TODO: find a better way
if not module_result:
return func_str.startswith("numpy.") or func_str.startswith("np.")
except NameError:
except Exception:
return False


Expand Down

0 comments on commit 0604df9

Please sign in to comment.