We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e11a17c commit e94a2b7Copy full SHA for e94a2b7
ads/common/serializer.py
@@ -15,6 +15,7 @@
15
import yaml
16
17
from ads.common import logger
18
+from ads.common.auth import default_signer
19
20
try:
21
from yaml import CSafeDumper as dumper
@@ -134,6 +135,14 @@ def _read_from_file(uri: str, **kwargs) -> str:
134
135
-------
136
string: Contents in file specified by URI
137
"""
138
+ # Add default signer if the uri is an object storage uri, and
139
+ # the user does not specify config or signer.
140
+ if (
141
+ uri.startswith("oci://")
142
+ and "config" not in kwargs
143
+ and "signer" not in kwargs
144
+ ):
145
+ kwargs.update(default_signer())
146
with fsspec.open(uri, "r", **kwargs) as f:
147
return f.read()
148
0 commit comments