Skip to content

refactor(chronos): require peft>=0.20 and drop the allowlist fallback - #65

Merged
AzulGarza merged 4 commits into
mainfrom
test/chronos-peft-load-kwargs
Oct 15, 2026
Merged

AzulGarza merged 4 commits into
mainfrom
test/chronos-peft-load-kwargs

Conversation

@AzulGarza

@AzulGarza AzulGarza commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Codecov reported 75% patch coverage on d182c4d (v0.1.13). The 2 uncovered lines were the fallback in _peft_load_kwargs for peft versions without an import allowlist, which a real test can't reach when CI installs a current peft. Project coverage was fine (88.65%).

Instead of testing that fallback with a patched sys.modules, this removes it:

  • peft added get_default_import_allowlist in 0.20.0 (0.18 and 0.19 don't have it; 0.17 doesn't import with transformers 5). _load_model now always passes import_allowlist=[*peft defaults, "chronos"] when loading a local LoRA adapter.
  • The dev group requires peft>=0.20.0,<1.
  • The existing test_chronos_lora_finetuning_save_and_reuse (real finetune, save, and reload of Chronos-2) covers every changed line; no patched tests.

Users who reload a saved LoRA checkpoint with peft 0.18 or 0.19 now get an ImportError and need to upgrade peft.

tests/models/test_chronos.py: 8 passed locally; _load_model fully covered.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 02:02

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@codspeed

codspeed Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

ℹ️ 13 benchmarks have no flame graph

The flamegraph could not be generated because we failed to resolve the symbols in the profiling trace. This happens when we fail to harvest information about language frames.

✅ 17 untouched benchmarks


Comparing test/chronos-peft-load-kwargs (be63a98) with main (d182c4d)

Open in CodSpeed

@AzulGarza AzulGarza changed the title test(chronos): cover the peft import allowlist helper refactor(chronos): require peft>=0.20 and drop the allowlist fallback Oct 15, 2026
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AzulGarza
AzulGarza merged commit 9221303 into main Oct 15, 2026
13 checks passed
@AzulGarza
AzulGarza deleted the test/chronos-peft-load-kwargs branch November 9, 2026 19:53
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.

2 participants