@@ -708,44 +708,3 @@ def _parse_module_url(msg):
708
708
module_url = match .group (1 ) if match else None
709
709
710
710
return module_url
711
-
712
-
713
-
714
- def upload_and_copy_score_resources (model , files , name = None ):
715
- '''Upload Python score resources to a model and copy the score resources
716
- to the Compute Server.
717
-
718
- For SAS Model Manager installations on SAS Viya 3.5, Python score resources
719
- are not automatically copied to the Compute server and a valid DS2 wrapper is not
720
- automatically generated for Python score code. After registering a new
721
- model or attempting to update an old model, pzmm.writeScoreCode.py creates
722
- Python score code and the DS2 wrapper, which can then be uploaded to the model and
723
- copied to the Compute Server using this function.
724
-
725
- In order to copy score resources to the Compute server, include the role key for
726
- each file.
727
-
728
- Parameters
729
- ----------
730
- model : str or dict
731
- The name or id of the model, or a dictionary representation of
732
- the model.
733
- files : list
734
- A list of dictionaries of the form {'name': filename, 'file': filecontent}.
735
- An optional 'role' key is supported for designating a file as score
736
- code, astore, etc.
737
- name : str
738
- Name of the file related to the model. The default is None.
739
-
740
- Returns
741
- -------
742
- response : list of RestObj
743
- A list of uploaded file contents as instances of ``RestObj``s.
744
- '''
745
- for file in files :
746
- if isinstance (file , dict ):
747
- mr .add_model_content (model , ** file )
748
- else :
749
- mr .add_model_content (model , file , name )
750
-
751
- return mr .copy_python_resources (model )
0 commit comments