@@ -107,12 +107,44 @@ def get_version(self, model, version):
107
107
ApiError: A subclass of ApiError will be raised if the API returns an error status,
108
108
or the client is unable to connect.
109
109
"""
110
- self .logger .debug ("getting versopm model %s version %s" , model , version )
110
+ self .logger .debug ("getting version model %s version %s" , model , version )
111
111
modelId = Model ._coerce_identifier (model )
112
112
versionId = ModelVersion ._coerce_identifier (version )
113
113
json_obj = self ._api_client .http .get ('{}/{}/versions/{}' .format (self ._base_route , modelId , versionId ))
114
114
return ModelVersion (json_obj , self ._api_client )
115
115
116
+ def get_version_input_sample (self , model , version ):
117
+ """Gets the input sample associated with the model and version provided.
118
+
119
+ Returns:
120
+ String: A json string with the input sample
121
+
122
+ Raises:
123
+ ApiError: A subclass of ApiError will be raised if the API returns an error status,
124
+ or the client is unable to connect.
125
+ """
126
+ self .logger .debug ("getting input sample: model %s version %s" , model , version )
127
+ modelId = Model ._coerce_identifier (model )
128
+ versionId = ModelVersion ._coerce_identifier (version )
129
+ json_obj = self ._api_client .http .get ('{}/{}/versions/{}/sample-input' .format (self ._base_route , modelId , versionId ))
130
+ return json_obj
131
+
132
+ def get_version_output_sample (self , model , version ):
133
+ """Gets the output sample associated with the model and version provided.
134
+
135
+ Returns:
136
+ String: A json string with the output sample
137
+
138
+ Raises:
139
+ ApiError: A subclass of ApiError will be raised if the API returns an error status,
140
+ or the client is unable to connect.
141
+ """
142
+ self .logger .debug ("getting output sample: model %s version %s" , model , version )
143
+ modelId = Model ._coerce_identifier (model )
144
+ versionId = ModelVersion ._coerce_identifier (version )
145
+ json_obj = self ._api_client .http .get ('{}/{}/versions/{}/sample-output' .format (self ._base_route , modelId , versionId ))
146
+ return json_obj
147
+
116
148
def get_all (self ):
117
149
"""Gets a list of all `Model` instances.
118
150
0 commit comments