Skip to content

Release Ethnicolr 2.0 - #141

Merged
soodoku merged 7 commits into
masterfrom
codex/inference-spine
Aug 18, 2026
Merged

Release Ethnicolr 2.0#141
soodoku merged 7 commits into
masterfrom
codex/inference-spine

Conversation

@soodoku

@soodoku soodoku commented Aug 17, 2026

Copy link
Copy Markdown
Member

Prepare Ethnicolr 2.0 with a coherent inference API, calibrated uncertainty and abstention metadata, PyTorch name models hosted on Hugging Face, typed lookup tables, renamed public functions, refreshed documentation, and standardized CI/release workflows.\n\nThis is intentionally a breaking release with no compatibility aliases.\n\nRelease validation is in progress; do not merge until all local, independent-review, and GitHub CI gates pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58a81fa2e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ethnicolr/neural_name_model.py Outdated
Comment on lines +379 to +380
uncertainty_method="mc-dropout" if uncertainty_level is not None else None,
uncertainty_level=uncertainty_level,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Record conformal requests in uncertainty metadata

When conformal_coverage is supplied, validation requires uncertainty_level=None, so these assignments always leave both metadata fields missing even though the result contains a conformal prediction set. Consumers relying on the inference contract therefore cannot determine that the set is split-conformal or whether its requested coverage was 0.80, 0.90, or 0.95; populate uncertainty_method and uncertainty_level from conformal_coverage in this branch.

Useful? React with 👍 / 👎.

Comment thread ethnicolr/name_dictionaries.py Outdated

category_probabilities[~script_supported] = np.nan
evidence_basis[~script_supported] = "none"
scored_rows = script_supported & np.isfinite(category_probabilities).any(axis=1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not mark partial Census distributions as scored

For an out-of-dictionary surname handled by the four-category neural fallback, aian and 2prace remain NaN, but this any(axis=1) check marks the row as scored. That contradicts the new contract's promise that every target probability on a scored row is finite and forms a complete distribution, and downstream code filtering on scored will receive incomplete six-category results. Either represent the unavailable categories consistently or avoid declaring such rows complete.

Useful? React with 👍 / 👎.

@soodoku

soodoku commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 3354e4e4bf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@soodoku
soodoku force-pushed the codex/inference-spine branch from 3354e4e to 85b83ec Compare August 18, 2026 00:22
@soodoku

soodoku commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85b83ecb19

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +397 to +399
surname_not_in_dictionary = ~surname_in_dictionary
neural_model_result = None
if surname_not_in_dictionary.any():

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Skip neural fallback for rows that must abstain

When an out-of-dictionary row has a missing, non-letter, or unsupported-script name, this condition still invokes estimate_census_surname; because neural weights are now downloaded on demand, an otherwise dictionary-based call such as a frame containing only null names can perform an unnecessary network request and fail offline instead of returning the promised abstention result. Restrict the fallback mask to script-supported rows and leave the other rows unscored.

Useful? React with 👍 / 👎.

Comment on lines +229 to +232
covered = (
adaptive_prediction_scores(category_probabilities, observed_categories)
<= conformal_quantile
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Measure coverage using the generated prediction sets

When the true class is the first class whose cumulative probability crosses the conformal quantile, build_conformal_prediction_sets includes it via the extra + 1, but this predicate reports it as uncovered because its cumulative score is greater than the quantile. Consequently the empirical coverage values written into every calibration statistics artifact measure a different, smaller set than inference actually returns, corrupting the reported validation results; compute membership using the same set-size rule used at inference.

Useful? React with 👍 / 👎.

@soodoku

soodoku commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@codex review

@soodoku

soodoku commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 550997232b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@soodoku
soodoku merged commit 710f38a into master Aug 18, 2026
12 checks passed
@soodoku
soodoku deleted the codex/inference-spine branch August 18, 2026 00:40
soodoku added a commit that referenced this pull request Aug 20, 2026
* Prepare Ethnicolr 2.0 release

* Fix release-blocking inference defects

* Fix inference contract review findings

* Preserve conflicting dictionary inputs

* Align Ruff pre-commit version

* Install training dependency for wheel tests

* Refresh audited development dependencies
soodoku added a commit that referenced this pull request Aug 20, 2026
* Prepare Ethnicolr 2.0 release

* Fix release-blocking inference defects

* Fix inference contract review findings

* Preserve conflicting dictionary inputs

* Align Ruff pre-commit version

* Install training dependency for wheel tests

* Refresh audited development dependencies
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.

1 participant