Skip to content

Commit

Permalink
Merge pull request #185 from stu-code/master
Browse files Browse the repository at this point in the history
Fixed score code gen bug
  • Loading branch information
djm21 authored Oct 11, 2024
2 parents 33a8026 + 692604c commit a6157e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sasctl/pzmm/write_score_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,18 +451,22 @@ def _write_imports(

try:
if current_session().version_info() != 3.5:
self.score_code += "import settings\n\n"
cls.score_code += "import settings\n\n"

"""
import settings
"""

except AttributeError:
warn(
"No current session connection was found to a SAS Viya server. Score "
"code will be written under the assumption that the target server is "
"SAS Viya 4."
)
cls.score_code += "import settings\n\n"


if mojo_model or binary_h2o_model:
self.score_code += "import h2o\n\nh2o.init()\n\n"
Expand Down

0 comments on commit a6157e9

Please sign in to comment.