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

Fix caption_with_cogvlm.py for cogvlm2 + textfile strategy #936

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

burgalon
Copy link
Contributor

@burgalon burgalon commented Sep 3, 2024

No description provided.

… where new_filepath was not defined if not outdir specified
@bghira
Copy link
Owner

bghira commented Sep 3, 2024

can you use the following .git/hooks/pre-commit and chmod +x it:

#!/bin/bash

export CHANGED_FILES
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -e '\.py$')
# Format each changed file:
for file in $CHANGED_FILES; do
    black "$file" || exit 1
    git add "$file"
done

python -m unittest discover -s tests/ || exit 1

exit 0

you may have to install black

@burgalon
Copy link
Contributor Author

burgalon commented Sep 4, 2024

Ran 56 tests in 6.374s

… where new_filepath was not defined if not outdir specified
@bghira bghira merged commit 5dcd649 into bghira:main Sep 4, 2024
1 check passed
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