Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add delay to L0_lifecycle test_load_new_model_version after each model file update #7735

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

kthui
Copy link
Contributor

@kthui kthui commented Oct 23, 2024

What does the PR do?

Add a small delay to L0_lifecycle test_load_new_model_version after each model file update, to prevent flaky results due to the update not being picked up by the server during model load request.

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.
  • Optional: Additional screenshots for behavior/output changes with before/after.

Commit Type:

Check the conventional commit type
box here and add the label to the github PR.

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Related PRs:

N/A

Where should the reviewer start?

Start by looking into the L0_lifecycle failure of pipeline 19628457

Test plan:

L0_lifecycle pass after the patch.

  • CI Pipeline ID: 19662667

Caveats:

N/A

Background

See #7730 and job 117883843

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

N/A

@kthui kthui added the PR: test Adding missing tests or correcting existing test label Oct 23, 2024
@kthui kthui force-pushed the jacky-lifecycle-model-version branch from 95b1c55 to 1af39e8 Compare October 23, 2024 19:34
@kthui kthui self-assigned this Oct 23, 2024
@kthui kthui marked this pull request as ready for review October 23, 2024 23:20
@kthui kthui requested a review from rmccorm4 October 23, 2024 23:21
Copy link
Collaborator

@rmccorm4 rmccorm4 left a comment

Choose a reason for hiding this comment

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

Just to check my understanding, is the flakiness coming from checks for model versions expected to be "not ready"?

I.e. The calls to "load" in some test cases are actually triggering a "reload" that may "unload" some instances (removed versions from from the diff of new config), and the server doesn't wait for each unload to completely finish before returning to the client, so the checks for "not ready" models may fail if it hasn't fully unloaded on server side yet?

I would expect "loads" to block on server side until actually complete and model considered ready before returning to client. Whereas I believe that "unloads" may not block until considered "not ready", so I want to double check if the flakiness is coming from one of these "unload" cases via a version-policy-change-only "reload".

@kthui
Copy link
Contributor Author

kthui commented Oct 24, 2024

I looked deeper into the failed server and client log, and found the last load operation was successful according to the client log, but according to the server log the load operation did not commence. Subsequently, the check for model version 1 is loaded failed.

If I remove the model config update from the test, I was able to reproduce the same client and server log locally.

Base on the finding, my hypothesis for the failure is the model config update has been written to disk, according to the Python script, which at that point the server should see the updated file, but for some reason the server was seeing the old version by the time the load operation arrived. I will update the test accordingly.

@kthui
Copy link
Contributor Author

kthui commented Oct 24, 2024

The test script on the container is updated to the latest and re-ran, see job 118303410

@kthui kthui requested a review from rmccorm4 October 24, 2024 18:13
Copy link
Collaborator

Choose a reason for hiding this comment

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

Moving to thread.

Base on the finding, my hypothesis for the failure is the model config update has been written to disk, according to the Python script, which at that point the server should see the updated file, but for some reason the server was seeing the old version by the time the load operation arrived. I will update the test accordingly.

Is there a bug in checking file modification time or something?

Copy link
Contributor Author

@kthui kthui Oct 24, 2024

Choose a reason for hiding this comment

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

I think this is unique to the CI, because I ran the test from the failing container locally 10 times and they all passed. I ran the test ~560 times last night on the CI without any time.sleep() and they all passed, see job 118186442.

Edit: The ~560 times CI run has --log-verbose=2, which could change some timing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think another possibility is the timestamp is the same before and after the file update, but this breaks our assumption that a ns precision timestamp is sufficient at determining the order of events.

Copy link
Collaborator

@rmccorm4 rmccorm4 left a comment

Choose a reason for hiding this comment

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

If it starts failing again even with this change, we should re-evaluate the methodology here

@kthui kthui merged commit a434122 into main Oct 24, 2024
3 checks passed
@kthui kthui deleted the jacky-lifecycle-model-version branch October 24, 2024 19:28
@kthui kthui changed the title test: Add small delay to L0_lifecycle test_load_new_model_version after each model reload test: Add small delay to L0_lifecycle test_load_new_model_version after each file update Oct 24, 2024
@kthui kthui changed the title test: Add small delay to L0_lifecycle test_load_new_model_version after each file update test: Add delay to L0_lifecycle test_load_new_model_version after each model file update Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: test Adding missing tests or correcting existing test
Development

Successfully merging this pull request may close these issues.

2 participants