-
Notifications
You must be signed in to change notification settings - Fork 0
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
Install dependencies with uv #81
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
#!/bin/bash | ||
|
||
# This script is called by our weekly dependency update job in Jenkins | ||
|
||
pip3 install uv > speech-to-text.txt && | ||
~/.local/bin/uv lock --upgrade >> speech-to-text.txt | ||
|
||
retVal=$? | ||
|
||
git add uv.lock && | ||
git commit -m "Update Python dependencies" | ||
|
||
if [ $retVal -ne 0 ]; then | ||
echo "ERROR UPDATING PYTHON (speech-to-text)" | ||
cat speech-to-text.txt | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Benchmark speech-to-text | ||
|
||
If you make changes to speech-to-text's software dependencies, especially the base nvidia/cuda Docker image or the Whisper software, it's a good idea to see what divergence there might be in the transcripts that are generated. To do this properly we should send the media through the complete speech-to-text workflow in the SDR, since it has certain options configured for Whisper as well as pre and post-processing. | ||
|
||
22 items have been deposited into the SDR development environment, and tagged so that they can be easily queued up for processing. See [the wiki](https://github.com/sul-dlss/speech-to-text/wiki/Load-testing-the-speech%E2%80%90to%E2%80%90text-workflow) for details on how to run them. | ||
|
||
The VTT file output for these transcripts as of 2025-01-31 has been stored in the `baseline` directory. When you are making updates to the speech-to-text software and want to examine the differences in output you can: | ||
|
||
1. Ensure your changes pass tests, either locally or in Github. | ||
2. Deploy your changes to the SDR QA environment by tagging a new version, e.g. `git tag rel-2025-01-29`, and pushing it to Github (`git push --tags`) so that the release Github Action runs. If this succeeds your changes will be live in the QA and Stage environments. Alternatively you can run deploy.sh directly (note that the Docker images generated come to around 20 GB, and may be slow to upload from a home connection). | ||
3. Use Argo's [bulk action](https://github.com/sul-dlss/speech-to-text/wiki/Load-testing-the-speech%E2%80%90to%E2%80%90text-workflow#running-text-extraction-as-a-bulk-action) to generate transcripts. | ||
4. Wait for the processing to be done. One easy way to do this is to look at them in the AWS Batch dashboard in the AWS Console. Or you can simply watch the last item in the batch to see when it completes. | ||
5. Run report.py: `python report.py` | ||
6. Commit your new report directory as a record. | ||
|
||
You should find a `index.md` Markdown file in a date stamped directory inside the `reports` directory. | ||
|
||
The `baseline` directory contains Cocina JSON and VTT files to use as baseline data. You may want to update these over time as understanding of what to use as a baseline changes. In an ideal world these would be more like ground truth data, or transcripts that have been vetted and corrected by people. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This documentation for the benchmarking process. You can ignore the output files below.