-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Overhaul ci/run.sh and enable tests with openllama model files #4586
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
Conversation
e438257
to
04fee21
Compare
@ggerganov Can you take a look at the stub ci-run.sh script? Just want to make sure this approach is OK with you before I continue in earnest. I think directly specifying what gets run will ultimately end up being easier to reason about than using flags for VRAM_GB, LOW_PERFORMANCE, etc. |
This looks a little odd at first, but I find it very useful as a convention to know if a command is part of our code vs a builtin.
Hm, not sure about the last 2 commits - I can see the intent, but we already have some Bash code that I don't plan to change. Use the style in https://github.com/ggml-org/ci as a reference. It can be improved with small steps when necessary Will continue to look at the other changes |
I think for now we should focus on just adding more tests to the existing The repetitive builds can be largely mitigated with the incoming |
a204354
to
0e41cc3
Compare
ggml-ci
2e2c237
to
3e4871a
Compare
@ggerganov this is ready. Unfortunately, I'm adding to the copy-paste structure in My biggest issues were high IO usage (SSD wear) and the need for manual cleanup after running it. I addressed this by wrapping it with a convenience script that isolates it to a separate directory, ideally on a ramdisk, and stores the persistent model/wikitext/etc files in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that that running ctest
without a label would fail. I guess it's fine, but would be nice to workaround somehow
If you just mean for the ergonomics of running ctest in terminal, exporting GG_RUN_CTEST_MODELFILE in e.g. ~/.bashrc would suffice. (This actually makes me realize that we don't need to check if we're running in make. We just need to check if the env variable is set or not. Then the model tests will work in make!) |
201a110
to
3e4871a
Compare
@ggerganov I've changed it so that the test outputs a warning if the This shouldn't pose an issue for usage in |
If there are no objections or concerns, I will merge this tomorrow |
* scripts : add lib.sh and lib_test.sh * scripts : stub out new ci-run.sh script * scripts : switch to PascalCase for functions This looks a little odd at first, but I find it very useful as a convention to know if a command is part of our code vs a builtin. * scripts : add some fancy conversion from snake_case to PascalCase * Add venv to ci/run.sh * Revert scripts work * scripts : add wrapper script for local use of ci/run.sh * Simplify .gitignore for tests, clang-tidy fixes * Label all ctest tests * ci : ctest uses -L main * Attempt at writing ctest_with_model * Update test-model-load-cancel * ci : add ctest_with_model for debug and release ggml-ci * Fix gg_get_model function ggml-ci * got stuck on CMake * Add get_model.cpp to tests/CMakeLists.txt ggml-ci * Fix README.md output for ctest_with_model ggml-ci * workflows : use `-L main` for all ctest ggml-ci * Fixes * GG_RUN_CTEST_MODELFILE => LLAMACPP_TESTMODELFILE * Always show warning rather than failing if model file variable is not set * scripts : update usage text for ci-run.sh
* scripts : add lib.sh and lib_test.sh * scripts : stub out new ci-run.sh script * scripts : switch to PascalCase for functions This looks a little odd at first, but I find it very useful as a convention to know if a command is part of our code vs a builtin. * scripts : add some fancy conversion from snake_case to PascalCase * Add venv to ci/run.sh * Revert scripts work * scripts : add wrapper script for local use of ci/run.sh * Simplify .gitignore for tests, clang-tidy fixes * Label all ctest tests * ci : ctest uses -L main * Attempt at writing ctest_with_model * Update test-model-load-cancel * ci : add ctest_with_model for debug and release ggml-ci * Fix gg_get_model function ggml-ci * got stuck on CMake * Add get_model.cpp to tests/CMakeLists.txt ggml-ci * Fix README.md output for ctest_with_model ggml-ci * workflows : use `-L main` for all ctest ggml-ci * Fixes * GG_RUN_CTEST_MODELFILE => LLAMACPP_TESTMODELFILE * Always show warning rather than failing if model file variable is not set * scripts : update usage text for ci-run.sh
The existing
ci/run.sh
script is currently inconvenient to use locally, has lots of repetitive logic (that does not otherwise improve clarity), compiles llama.cpp more times than strictly necessary, and requires manual cleanup between runs.This PR aims to address the above, improve readability and maintainability, and make it possible to run ctests against the downloaded openllama model.
Standardize bash helper lib (logging, etc.)Rewrite ci/run.shWrite GH actions workflow for shell tests (lib_test.sh, etc.)