-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register Astore Model in Python Error #115
Comments
Same here, Viya 2021.2.5 |
I am having the same issue by running the example register_sas_regression_model.py. The following errors are generated: HTTPError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\sasctl\tasks.py in register_model(model, name, project, repository, input, version, files, force, record_packages) ~\Anaconda3\lib\site-packages\sasctl_services\model_repository.py in import_model_from_zip(cls, name, project, file, description, version) ~\Anaconda3\lib\site-packages\sasctl_services\service.py in post(cls, *args, **kwargs) ~\Anaconda3\lib\site-packages\sasctl_services\service.py in request(cls, verb, path, session, format_, **kwargs) ~\Anaconda3\lib\site-packages\sasctl\core.py in request(verb, path, session, format, **kwargs) HTTPError: HTTP Error 422: {"links":[{"method":"GET","rel":"self","href":"/modelRepository/models?start=0&limit=1","uri":"/modelRepository/models?start=0&limit=1","type":"application/vnd.sas.collection","itemType":"application/vnd.sas.models.model.summary"},{"method":"POST","rel":"createModel","href":"/modelRepository/models","uri":"/modelRepository/models","type":"application/vnd.sas.models.model","responseType":"application/vnd.sas.models.model"}],"name":"models","start":0,"count":1,"items":[{"errorCode":0,"message":"","links":[],"version":2,"httpStatusCode":422}],"limit":1,"version":2} |
This error was caused by a defect in SAS Model Manager's API. It has been fixed for SAS Viya 2022.1.2, which I have verified by running the register_sas_regression_model.py example. |
Using Python, I created a model using a CAS action set and have attempted to register the model and metadata to a SAS Viya 4 instance of Model Manager, but I continue to get the following error. I've also attached a copy of the script in text format.
C:\Users\chparr\Anaconda3\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'fsbulab.fsbu-azure-k8s.unx.sas.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
dmcas_fitstat.json was successfully written and saved to C:\Users\chparr\OneDrive - SAS\spyder\outputs\test_python_cas\dmcas_fitstat.json
NOTE: Added action set 'percentile'.
NOTE: Cloud Analytic Services made the uploaded file available as table SCOREDVALUES in caslib CASUSER(chparr).
NOTE: The table SCOREDVALUES has been created in caslib CASUSER(chparr) from binary data uploaded to Cloud Analytic Services.
NOTE: Cloud Analytic Services made the uploaded file available as table SCOREDVALUES in caslib CASUSER(chparr).
NOTE: The table SCOREDVALUES has been created in caslib CASUSER(chparr) from binary data uploaded to Cloud Analytic Services.
NOTE: Cloud Analytic Services made the uploaded file available as table SCOREDVALUES in caslib CASUSER(chparr).
NOTE: The table SCOREDVALUES has been created in caslib CASUSER(chparr) from binary data uploaded to Cloud Analytic Services.
dmcas_roc.json was successfully written and saved to C:\Users\chparr\OneDrive - SAS\spyder\outputs\test_python_cas\dmcas_roc.json
dmcas_lift.json was successfully written and saved to C:\Users\chparr\OneDrive - SAS\spyder\outputs\test_python_cas\dmcas_lift.json
C:\Users\chparr\Anaconda3\lib\site-packages\urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'fsbulab.fsbu-azure-k8s.unx.sas.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
NOTE: Added action set 'astore'.
NOTE: Cloud Analytic Services saved the file _7089A6AF5EF24A1CA5A1A1565.sashdat in caslib ModelStore.
Traceback (most recent call last):
File "C:\Users\chparr\OneDrive - SAS\spyder\cas_aml_customer_risk_model.py", line 173, in
register_model(model_astore, model_name, project_name, files=files, force=True, version='latest')
File "C:\Users\chparr\Anaconda3\lib\site-packages\sasctl\tasks.py", line 316, in register_model
model = mr.import_model_from_zip(name, project, zipfile, version=version)
File "C:\Users\chparr\Anaconda3\lib\site-packages\sasctl_services\model_repository.py", line 525, in import_model_from_zip
r = cls.post(
File "C:\Users\chparr\Anaconda3\lib\site-packages\sasctl_services\service.py", line 113, in post
return cls.request('post', *args, **kwargs)
File "C:\Users\chparr\Anaconda3\lib\site-packages\sasctl_services\service.py", line 93, in request
return core.request(verb, path, session, format_, **kwargs)
File "C:\Users\chparr\Anaconda3\lib\site-packages\sasctl\core.py", line 1627, in request
raise HTTPError(
HTTPError: {"links":[{"method":"GET","rel":"self","href":"/modelRepository/models?start=0&limit=1","uri":"/modelRepository/models?start=0&limit=1","type":"application/vnd.sas.collection","itemType":"application/vnd.sas.models.model.summary"},{"method":"POST","rel":"createModel","href":"/modelRepository/models","uri":"/modelRepository/models","type":"application/vnd.sas.models.model","responseType":"application/vnd.sas.models.model"}],"name":"models","start":0,"count":1,"items":[{"errorCode":0,"message":"","links":[],"version":2,"httpStatusCode":422}],"limit":1,"version":2}
cas_aml_customer_risk_model.txt
cas_aml_customer_risk_model.txt
The text was updated successfully, but these errors were encountered: