Add unit tests for sampling and text utilities - #277
Conversation
Adds coverage for concordia/utils/sampling.py (extract_choice_response, dynamically_adjust_temperature) and concordia/utils/text.py (wrap, truncate).
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@googlebot I signed it! |
|
Hi maintainers, All CI checks, CLA verification, and tests are passing successfully. This PR adds unit test coverage for previously untested utility functions . I would appreciate any feedback or review when convenient. Thanks for your time! |
|
Hi @vezhnick, gentle ping on this one — it's been about a month with no review yet. It's a small, low-risk addition: unit tests only (31 tests for No rush if the queue is backed up — just wanted to make sure it hadn't slipped through. Happy to rebase or adjust anything if needed. |
Adds unit test coverage for two previously untested helper modules:
concordia/utils/sampling.py—extract_choice_response(single-char, trailing paren/period, parenthesized-in-string, and no-match cases) anddynamically_adjust_temperature(below / at / above the attempt midpoint).concordia/utils/text.py—wrap(width handling, newline preservation, empty input) andtruncate(max_length, delimiters, and combined).All 31 tests pass locally via
python -m pytest concordia/utils/sampling_test.py concordia/utils/text_test.py.