You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from sasctl.services import model_repository as mr
211
+
212
+
model = mr.get_model('Model Name')
213
+
publish_model(model, 'Destination Name')
214
+
215
+
216
+
Execute a model in MAS
217
+
~~~~~~~~~~~~~~~~~~~~~~
218
+
219
+
::
220
+
221
+
from sasctl import Session
222
+
from sasctl.services import microanalytic_score as mas
223
+
224
+
module = mas.get_module('Module Name')
225
+
module.predict(model_inputs)
183
226
184
227
185
-
- publish a model
186
-
- score a model
187
228
188
229
See the :file:`examples/` directory in the repository for more complete examples.
189
230
@@ -274,8 +315,22 @@ by updating this logger, or the ``sasctl.core.session`` logger can be configured
274
315
HATEOAS
275
316
+++++++
276
317
277
-
Coming soon.
318
+
Many of the SAS microservices follow the `HATEOAS`_ paradigm and the standard is for services to return a links
319
+
collection containing valid operations. Most **sasctl** operations return one or more instances of :class:`~sasctl.core.RestObj`. Any
320
+
links related to that object are accessible via the ['links'] key. Each link is represented as a dictionary containing metadata::
321
+
322
+
{'method': 'POST', 'rel':
323
+
'createFolder',
324
+
'href': '/folders/folders',
325
+
'uri': '/folders/folders',
326
+
'type': 'application/vnd.sas.content.folder'}
327
+
328
+
However, instead of having to parse this collection to find a link, **sasctl** includes some functions to make this easy: :func:`~sasctl.core.get_link` and :func:`~sasctl.core.request_link`.
329
+
330
+
Given an object and a link name (`rel`) :func:`~sasctl.core.get_link` will return the metadata for that link. Similarly,
331
+
:func:`~sasctl.core.request_link` will make the request to the link and return the response object.
0 commit comments