Browse Source

to be compatible with ts inference yaml (#2682)

Tingquan Gao 11 tháng trước cách đây
mục cha
commit
e05a4206e2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      paddlex/inference/utils/io/readers.py

+ 1 - 1
paddlex/inference/utils/io/readers.py

@@ -349,5 +349,5 @@ class YAMLReaderBackend(_BaseReaderBackend):
 
     def read_file(self, in_path, **kwargs):
         with open(in_path, "r", encoding="utf-8", **kwargs) as yaml_file:
-            data = yaml.safe_load(yaml_file)
+            data = yaml.load(yaml_file, Loader=yaml.FullLoader)
         return data