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

Add load test #3496

Merged
merged 6 commits into from
Aug 30, 2024
Merged

Add load test #3496

merged 6 commits into from
Aug 30, 2024

Conversation

BabyChouSr
Copy link
Collaborator

Load test to stress a certain server address with requests and test many different image configurations if necessary.

Copy link
Member

@infwinston infwinston left a comment

Choose a reason for hiding this comment

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

Thanks @BabyChouSr ! left one quick comment

tests/load_test.py Outdated Show resolved Hide resolved
tests/load_test.py Outdated Show resolved Hide resolved
Copy link
Member

@infwinston infwinston left a comment

Choose a reason for hiding this comment

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

Thanks a lot @BabyChouSr ! this would be super useful for endpoint stress test

tests/load_test.py Outdated Show resolved Hide resolved
tests/load_test.py Outdated Show resolved Hide resolved
tests/load_test.py Outdated Show resolved Hide resolved
for _ in batch:
if args.include_image:
# Generate a random dimension for the image
y_dimension = np.random.randint(100, 1025)
Copy link
Member

Choose a reason for hiding this comment

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

do you think we should use the same size image to measure latency more consistently?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a good point but it also depends on the goal of our analysis. One thing to think about is the Phi-3.5 bug which was due to the model not being able to handle a certain resolution, which is why randomizing the input and feeding it in could be useful. But yes, for better determinism so we can compare across models, we should make this constant.

Copy link
Member

@infwinston infwinston Aug 28, 2024

Choose a reason for hiding this comment

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

great point.. maybe we can add an argument say --random-size then we randomize the input size

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

agreed. added.

tests/load_test.py Outdated Show resolved Hide resolved
Copy link
Member

@infwinston infwinston left a comment

Choose a reason for hiding this comment

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

Great work, thanks @BabyChouSr !

@infwinston infwinston merged commit 93037a4 into lm-sys:main Aug 30, 2024
1 check passed
infwinston pushed a commit that referenced this pull request Oct 6, 2024
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