File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ def pzmmImportModel(
121
121
inputDF ,
122
122
targetDF ,
123
123
predictmethod ,
124
- metrics = [ "EM_EVENTPROBABILITY" , "EM_CLASSIFICATION" ] ,
124
+ metrics = None ,
125
125
projectVersion = "latest" ,
126
126
modelFileName = None ,
127
127
pyPath = None ,
@@ -171,7 +171,7 @@ def pzmmImportModel(
171
171
the format() command.
172
172
For example: '{}.predict_proba({})'.
173
173
metrics : string list, optional
174
- The scoring metrics for the model. The default is a set of two
174
+ The scoring metrics for the model. The default is a list of two
175
175
metrics: EM_EVENTPROBABILITY and EM_CLASSIFICATION.
176
176
projectVersion : string, optional
177
177
The project version to import the model in to on SAS Model Manager. The default value
@@ -201,6 +201,10 @@ def pzmmImportModel(
201
201
Model details from an MLFlow model. This dictionary is created by the readMLModelFile function.
202
202
By default None.
203
203
"""
204
+ # Set metrics internal to function call if no value is given
205
+ if metrics is None :
206
+ metrics = ["EM_EVENTPROBABILITY" , "EM_CLASSIFICATION" ]
207
+
204
208
# Initialize no score code or binary H2O model flags
205
209
noScoreCode = False
206
210
binaryModel = False
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def writeScoreCode(
17
17
modelPrefix ,
18
18
predictMethod ,
19
19
modelFileName ,
20
- metrics = [ "EM_EVENTPROBABILITY" , "EM_CLASSIFICATION" ] ,
20
+ metrics = None ,
21
21
pyPath = Path .cwd (),
22
22
threshPrediction = None ,
23
23
otherVariable = False ,
@@ -120,6 +120,10 @@ def writeScoreCode(
120
120
pickleType : string, optional
121
121
Indicator for MLFlow models, which may pickle by non-standard methods. By default 'pickle'.
122
122
"""
123
+ # Set metrics internal to function call if no value is given
124
+ if metrics is None :
125
+ metrics = ["EM_EVENTPROBABILITY" , "EM_CLASSIFICATION" ]
126
+
123
127
# Check if binary string model
124
128
if binaryString is not None :
125
129
isBinaryString = True
You can’t perform that action at this time.
0 commit comments