From 033482dddfa3d893fe3134eefce3369b8b680acb Mon Sep 17 00:00:00 2001 From: jim19930609 Date: Thu, 27 Jan 2022 08:29:18 +0000 Subject: [PATCH] Fixed yaml.load() method failure --- .../auto_code_generator/final_state_generator/eager_gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py b/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py index 556e0f1b325..fd5c3980379 100644 --- a/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py +++ b/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py @@ -103,13 +103,13 @@ def GetAutoGradMetaVectorName(string): ###################### def ReadFwdFile(filepath): f = open(filepath, 'r') - contents = yaml.load(f) + contents = yaml.load(f, Loader=yaml.FullLoader) return contents def ReadBwdFile(filepath): f = open(filepath, 'r') - contents = yaml.load(f) + contents = yaml.load(f, Loader=yaml.FullLoader) ret = {} for content in contents: assert 'backward_api' in content.keys() -- GitLab