Skip to content

Commit 8a0bc1b

Browse files
authored
Merge pull request #299 from Paperspace/PS-14050-Fix_NotImplementedError_when_parsing_some_experiments
Fix NotImplementedError when parsing experiments with volume options
2 parents 291a80b + 298c2d8 commit 8a0bc1b

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

gradient/api_sdk/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .artifact import Artifact
22
from .cluster import Cluster
3-
from .dataset import Dataset
3+
from .dataset import Dataset, VolumeOptions
44
from .deployment import Deployment
55
from .experiment import BaseExperiment, MultiNodeExperiment, SingleNodeExperiment, MpiMultiNodeExperiment
66
from .hyperparameter import Hyperparameter

gradient/api_sdk/serializers/dataset.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77

88
class DatasetVolumeOptionsSchema(BaseSchema):
9+
MODEL = models.VolumeOptions
10+
911
kind = ma.fields.Str(required=True)
1012
size = ma.fields.Str(required=True)
1113

tests/example_responses.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,16 @@
3636
},
3737
"triggerEvent": None,
3838
"triggerEventId": None
39-
}
39+
},
40+
"datasets": [
41+
{
42+
"uri": "s3://some/dataset",
43+
"volume_options": {
44+
"kind": "dynamic",
45+
"size": "10Gi",
46+
},
47+
},
48+
],
4049
},
4150
{
4251
"dtCreated": "2019-03-21T07:46:57.706055+00:00",
@@ -4586,7 +4595,16 @@
45864595
},
45874596
"triggerEvent": None,
45884597
"triggerEventId": None
4589-
}
4598+
},
4599+
"datasets": [
4600+
{
4601+
"uri": "s3://some/dataset",
4602+
"volume_options": {
4603+
"kind": "dynamic",
4604+
"size": "10Gi",
4605+
},
4606+
},
4607+
],
45904608
},
45914609
"message": "success"
45924610
}

0 commit comments

Comments
 (0)