Fix import error and add source_files to config
Browse files- foundation_bert.py +5 -2
foundation_bert.py
CHANGED
|
@@ -144,10 +144,13 @@ class FoundationBert(BertModel):
|
|
| 144 |
"""
|
| 145 |
Modification to correctly handle loading extraneous parameters for GBert
|
| 146 |
"""
|
| 147 |
-
|
| 148 |
-
|
|
|
|
|
|
|
| 149 |
with open(model_config, 'r') as f:
|
| 150 |
config = yaml.load(f, Loader=MyLoader)
|
|
|
|
| 151 |
kwargs['modalities'] = config['modalities']
|
| 152 |
kwargs['dataset_path'] = config['dataset_path']
|
| 153 |
kwargs['mask_token'] = config['mask_token']
|
|
|
|
| 144 |
"""
|
| 145 |
Modification to correctly handle loading extraneous parameters for GBert
|
| 146 |
"""
|
| 147 |
+
|
| 148 |
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 149 |
+
model_config = os.path.join(current_dir, 'train_config.yaml')
|
| 150 |
+
print(f"🆘 DEBUG: Attempting to load config from: {model_config}")
|
| 151 |
with open(model_config, 'r') as f:
|
| 152 |
config = yaml.load(f, Loader=MyLoader)
|
| 153 |
+
|
| 154 |
kwargs['modalities'] = config['modalities']
|
| 155 |
kwargs['dataset_path'] = config['dataset_path']
|
| 156 |
kwargs['mask_token'] = config['mask_token']
|