sassoftware / sassoftware/python-sasctl

Scoring code for H2O (binary) contains errors

Open
#189 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
52
Forks
45
Avg merge
23h 38m
Merged PRs (30d)
2

Description

I have built the H2O model based on the example:
https://github.com/sassoftware/python-sasctl/blob/master/examples/pzmm_h2o_model_import.ipynb
Then imported into Model Manager

There is one minor issue at this stage, when any Python developed model is imported with pzmm, in Model Manager the Score code file doesn't have the Score code attribute set. It has to be set manually which causes problems when CI/CD approach is considered

Let's continue with H2O model issue.
When H2O model is imported as the Binary one the Score code function contains several errors:

  1. The model load statement is model=h2o.load(). The load() method is not defined for h2o it should be load_model
  2. The model path within model=h2o.load() statement is wrong. The model pickle file name should be placed into quotation marks
  3. There are a few places with prediction variable comparison e.g. prediction[1][2] > 0.5. Prediction is defined as STR therefore it will generate an error. it should be casted into float using float()

Version
1.10.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/pzmm_h2o_model_import.ipynb and reproduce the binary H2O import, then inspect the generated Score code and its Score code attribute in Model Manager. Done means the attribute is set automatically and the generated code uses h2o.load_model, quotes the model pickle path, and casts prediction values to float before comparison.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.