Skip to content

fix: training never replaces cold-start model _drop_timestamp called as instance method - #81

Open
madhugoutham wants to merge 3 commits into
llm-d:mainfrom
madhugoutham:fix/drop-timestamp-self-call
Open

fix: training never replaces cold-start model _drop_timestamp called as instance method#81
madhugoutham wants to merge 3 commits into
llm-d:mainfrom
madhugoutham:fix/drop-timestamp-self-call

Conversation

@madhugoutham

@madhugoutham madhugoutham commented Aug 18, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Fixes the training failure caused by calling the module-level _drop_timestamp() helper as self._drop_timestamp().

The fix:

  • removes the ineffective module-level @staticmethod decorator;
  • calls _drop_timestamp() directly at all four call sites;
  • adds unit coverage for cold-start model replacement;
  • updates the dual-server integration test to verify retraining completes.

Why is this change needed?

The previous code raised:

text
AttributeError: LatencyPredictor object has no attribute _drop_timestamp

The exception was caught by the training loop, leaving the cold-start or previously loaded model installed instead of replacing it with a newly trained model.

How was this tested?

  • Unit test added for successful model replacement after retraining
  • Dual-server integration test updated and executed
  • Manual testing performed

Fixes #80

  _drop_timestamp is a module-level function, not a method on
  LatencyPredictor. Calling it via self. raised AttributeError on
  every retrain attempt, silently caught, leaving the cold-start
  stub model permanently installed instead of a real trained one.

  Also drops the @staticmethod decorator on the module-level
  definition -- it has no effect outside a class and was misleading.

  Fixes llm-d#80

Signed-off-by: Madhu Goutham Reddy Ambati <mambati@redhat.com>
Signed-off-by: madhugoutham <79179882+madhugoutham@users.noreply.github.com>
Signed-off-by: Madhu Goutham Reddy Ambati <mambati@redhat.com>
@madhugoutham
madhugoutham marked this pull request as ready for review August 18, 2026 02:28
@madhugoutham
madhugoutham requested a review from ahg-g as a code owner August 18, 2026 02:28
Signed-off-by: Madhu Goutham Reddy Ambati <mambati@redhat.com>
@madhugoutham

Copy link
Copy Markdown
Member Author

PTAL @kaushikmitr

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

This PR is marked as stale after 21d of inactivity. After an additional 14d of inactivity (7d to become rotten, then 7d more), it will be closed. To prevent this PR from being closed, add a comment or remove the lifecycle/stale label.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Training fails because _drop_timestamp is called as an instance method

1 participant