Skip to content

Mixed-kind test predictor warns when pandas infers string dtype #454

Description

@iskandr

The full one-worker gate for #451 reached 5,023 passes and one failure: test_model_scope_and_coverage_are_explicit raises pandas' all-NA concatenation FutureWarning from tests/test_candidate_tables.py::MultiKindModel.predict_dataframe.

Reproducer: run MultiKindModel().predict_dataframe(['SIINFEKL']) inside pd.option_context('future.infer_string', True) with warnings treated as errors. Its allele-free branch assigns None into new object columns while the binding branch has inferred string dtype, then concatenates the frames. The focused run using pandas' ordinary object-string default does not warn.

Construct the synthetic backend's records as one DataFrame so both kinds receive consistent inferred dtypes, and run the mixed-kind occurrence API regression in both string modes using the existing restoring fixture. Do not suppress the warning or drop allele-free rows.

The suite-order trigger is the installed Hitlist package: its documented import side effect enables pandas.options.future.infer_string. A full optional-integration environment can therefore reach the new test in inferred-string mode even though the isolated focused run starts in object-string mode. The fix supports both modes without changing that dependency or suppressing diagnostics.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions