Skip to content

Verify logistic_regression_rows y param is column-indexed#13849

Merged
danking merged 3 commits into
hail-is:mainfrom
ehigham:ehigham/fix-13788-column-indexed-parameter-guards
Oct 18, 2023
Merged

Verify logistic_regression_rows y param is column-indexed#13849
danking merged 3 commits into
hail-is:mainfrom
ehigham:ehigham/fix-13788-column-indexed-parameter-guards

Conversation

@ehigham

@ehigham ehigham commented Oct 18, 2023

Copy link
Copy Markdown
Member

Fixes #13788:

  • Add raise_unless_column_indexed guard and apply to all column-indexed parameters in statgen.py.
  • Rename check_row_indexed and check_entry_indexed as I'm allergic to functions called "check" - now it's clearer what they do.

Fixes hail-is#13788:
- Add `raise_unless_column_indexed` guard and apply to all column-indexed
parameters in `statgen.py`.
- Rename `check_row_indexed` and `check_entry_indexed` as I'm allergic to
functions called "check" - now it's clearer what they do.

@danking danking left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, very thorough fix.

" found no indices (no source)")
raise ExpressionException(f"{caller}: expression must be entry-indexed"
f", found no indices (no source)"
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh good fix

mt = hl.utils.range_matrix_table(2,2)
mt = mt.annotate_entries(prod = mt.row_idx * mt.col_idx)

with pytest.raises(hl.ExpressionException):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@danking danking merged commit 7eaf390 into hail-is:main Oct 18, 2023
@ehigham ehigham deleted the ehigham/fix-13788-column-indexed-parameter-guards branch October 25, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[query] bad error message in ir/renderer.py

2 participants