Fix incorrect method call in updateExpTextProcessingTime()#334
Conversation
58c953d to
59036d5
Compare
This commit fixes a bug where the method updateExpTextProcessingTime incorrectly called getExpImgProcessingTime. The change ensures that text and image processing times are tracked independently. Additionally, unit tests have been added to verify the correct functionality of processing time tracking for both text and image generations. Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
59036d5 to
ba8ad92
Compare
|
@kyteinsky do you have a branch for 31? |
|
/backport to stable32 |
|
The backport to # Switch to the target branch and update it
git checkout stable32
git pull origin stable32
# Create the new backport branch
git checkout -b backport/334/stable32
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick ba8ad924
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/334/stable32Error: Failed to cherry pick commits: error: no cherry-pick or revert in progress Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
stable32 should cover 30 -> 32 |
|
/backport c5f8411 to stable32 |
This commit fixes a bug where the method updateExpTextProcessingTime incorrectly called getExpImgProcessingTime. The change ensures that text and image processing times are tracked independently. Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
…) (#344) This commit fixes a bug where the method updateExpTextProcessingTime incorrectly called getExpImgProcessingTime. The change ensures that text and image processing times are tracked independently. Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> Co-authored-by: Misha M.-Kupriyanov <145785698+printminion-co@users.noreply.github.com>
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
This commit fixes a bug where the method updateExpTextProcessingTime incorrectly called getExpImgProcessingTime. The change ensures that text and image processing times are tracked independently.
Description
Fixes a bug in
updateExpTextProcessingTime()where it incorrectly callsgetExpImgProcessingTime()instead ofgetExpTextProcessingTime(). This causes database type conflicts when processing text generation tasks.The Bug
File:
lib/Service/OpenAiAPIService.phpLine: 850
The function reads image processing time configuration when it should read text processing time configuration:
This causes a mismatch between:
openai_image_generation_time/localai_image_generation_timeopenai_text_generation_time/localai_text_generation_timeImpact
Error Message
When it Occurs
Affected Versions
The Fix
Change line 850 to call the correct method:
public function updateExpTextProcessingTime(int $runtime): void { - $oldTime = floatval($this->getExpImgProcessingTime()); + $oldTime = floatval($this->getExpTextProcessingTime()); $newTime = (1.0 - Application::EXPECTED_RUNTIME_LOWPASS_FACTOR) * $oldTime + Application::EXPECTED_RUNTIME_LOWPASS_FACTOR * floatval($runtime);Root Cause
Copy-paste error when
updateExpTextProcessingTime()was created. The correspondingupdateExpImgProcessingTime()method (line 774) correctly callsgetExpImgProcessingTime(), but this pattern wasn't updated for the text processing variant.Testing
The fix ensures:
Reproduction
Stack Trace Context
Checklist