Skip to content

fix: avoid eager estimator fallback lookup - #491

Open
blackdragoon26 wants to merge 2 commits into
kubeedge:mainfrom
blackdragoon26:fix/backend-fit-fallback-only
Open

blackdragoon26 wants to merge 2 commits into
kubeedge:mainfrom
blackdragoon26:fix/backend-fit-fallback-only

Conversation

@blackdragoon26

@blackdragoon26 blackdragoon26 commented Aug 14, 2026 •

Copy link
Copy Markdown

What type of PR is this?

/kind bug

What this PR does / why we need it:

Selects fit() or the fallback method lazily in BackendBase.train() and BackendBase.update(). Fit-only, train-only, and update-only estimators no longer fail during eager fallback attribute lookup.

Which issue(s) this PR fixes:

Fixes #490

Validation:

Added lib/tests/test_backend_base.py with focused cases covering:

  • train() with a fit-only estimator;
  • train() falling back to train();
  • update() with a fit-only estimator;
  • update() falling back to update().
PYTHONPATH=lib python -m unittest discover -s lib/tests -v

Result: 4 tests passed. Python compilation and git diff --check also pass.

Select fit or update lazily so estimators implementing only the supported method can run without an attribute lookup failure.

Signed-off-by: blackdragoon26 <sankalp.jha9643@gmail.com>
@kubeedge-bot kubeedge-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. labels Aug 14, 2026
@kubeedge-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: blackdragoon26
To complete the pull request process, please assign jaypume after the PR has been reviewed.
You can assign the PR to them by writing /assign @jaypume in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 14, 2026
@blackdragoon26
blackdragoon26 marked this pull request as ready for review August 14, 2026 11:28
@kubeedge-bot kubeedge-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2026
@blackdragoon26

Copy link
Copy Markdown
Author

Kindly review this PR
@JimmyYang20 @TymonXie

@kubeedge-bot kubeedge-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 24, 2026
Signed-off-by: blackdragoon26 <sankalp.jha9643@gmail.com>
@blackdragoon26
blackdragoon26 force-pushed the fix/backend-fit-fallback-only branch 2 times, most recently from ad06846 to 0b2975f Compare August 24, 2026 14:12

This branch has not been deployed

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

Labels

kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] BackendBase fails with fit-only estimators

2 participants