Spaces:
Runtime error
Runtime error
Pedro Cuenca
commited on
Commit
·
08dd098
1
Parent(s):
a77c0d4
Never consider local dirs as remote wandb references.
Browse filesIn case the user provides a previously downloaded artifact directory.
src/dalle_mini/model/modeling.py
CHANGED
|
@@ -17,6 +17,7 @@
|
|
| 17 |
import math
|
| 18 |
from functools import partial
|
| 19 |
from typing import Optional, Tuple
|
|
|
|
| 20 |
|
| 21 |
import flax.linen as nn
|
| 22 |
import jax
|
|
@@ -568,7 +569,7 @@ class DalleBart(FlaxBartPreTrainedModel, FlaxBartForConditionalGeneration):
|
|
| 568 |
"""
|
| 569 |
Initializes from a wandb artifact, or delegates loading to the superclass.
|
| 570 |
"""
|
| 571 |
-
if ':' in pretrained_model_name_or_path:
|
| 572 |
# wandb artifact
|
| 573 |
artifact = wandb.Api().artifact(pretrained_model_name_or_path)
|
| 574 |
|
|
|
|
| 17 |
import math
|
| 18 |
from functools import partial
|
| 19 |
from typing import Optional, Tuple
|
| 20 |
+
import os
|
| 21 |
|
| 22 |
import flax.linen as nn
|
| 23 |
import jax
|
|
|
|
| 569 |
"""
|
| 570 |
Initializes from a wandb artifact, or delegates loading to the superclass.
|
| 571 |
"""
|
| 572 |
+
if ':' in pretrained_model_name_or_path and not os.path.isdir(pretrained_model_name_or_path):
|
| 573 |
# wandb artifact
|
| 574 |
artifact = wandb.Api().artifact(pretrained_model_name_or_path)
|
| 575 |
|