Skip to content

Verify logistic_regression_rows y param is column-indexed #13849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ehigham
Copy link
Member

@ehigham ehigham commented Oct 18, 2023

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.
Copy link
Contributor

@danking danking left a comment

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
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
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