Update configuration_autoencoder.py to support relative import for HF dynamic modules
Browse files
configuration_autoencoder.py
CHANGED
@@ -5,6 +5,12 @@ Autoencoder configuration for Hugging Face Transformers.
|
|
5 |
from transformers import PretrainedConfig
|
6 |
from typing import List, Optional
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
class AutoencoderConfig(PretrainedConfig):
|
10 |
"""
|
|
|
5 |
from transformers import PretrainedConfig
|
6 |
from typing import List, Optional
|
7 |
|
8 |
+
# Support both package-relative and flat import in HF remote code context
|
9 |
+
try:
|
10 |
+
from . import __version__ as _pkg_version # type: ignore
|
11 |
+
except Exception: # pragma: no cover
|
12 |
+
_pkg_version = None
|
13 |
+
|
14 |
|
15 |
class AutoencoderConfig(PretrainedConfig):
|
16 |
"""
|