Transparent proxy to the internal ``modelscope_hub.HubApi``. Only invoked when normal attribute lookup (instance dict, class hierarchy including :class:`LegacyHubApi`) fails. Private names are excluded to avoid recursion during ``__init__``.
(self, name: str)
| 304 | return out_path |
| 305 | |
| 306 | def __getattr__(self, name: str): |
| 307 | """Transparent proxy to the internal ``modelscope_hub.HubApi``. |
| 308 | |
| 309 | Only invoked when normal attribute lookup (instance dict, class |
| 310 | hierarchy including :class:`LegacyHubApi`) fails. Private names are |
| 311 | excluded to avoid recursion during ``__init__``. |
| 312 | """ |
| 313 | if name.startswith('_'): |
| 314 | raise AttributeError(name) |
| 315 | try: |
| 316 | inner = object.__getattribute__(self, '_api') |
| 317 | except AttributeError as exc: |
| 318 | raise AttributeError(name) from exc |
| 319 | try: |
| 320 | return getattr(inner, name) |
| 321 | except AttributeError: |
| 322 | raise AttributeError( |
| 323 | f"'{type(self).__name__}' object has no attribute '{name}'" |
| 324 | ) from None |
| 325 | |
| 326 | |
| 327 | class ModelScopeConfig: |