Skip to content

Comments

Set up text encoder tests to work with pytest and Github Actions#302

Merged
SolitaryThinker merged 8 commits intohao-ai-lab:mainfrom
kevin314:setup-pytest
Apr 2, 2025
Merged

Set up text encoder tests to work with pytest and Github Actions#302
SolitaryThinker merged 8 commits intohao-ai-lab:mainfrom
kevin314:setup-pytest

Conversation

@kevin314
Copy link
Collaborator

@kevin314 kevin314 commented Mar 30, 2025

Changed test_clip_encoder.py and test_llama.encoder.py to work with pytest:

  • Adds local_dir param to maybe_download_model to download model during test execution
  • Sets MASTER_ADDR and MASTER_PORT as environment vars in test script, avoid need for torchrun
  • Hardcode inference args
  • Adds fixture for distributed env setup/teardown between tests

Usage:
pytest ./fastvideo/v1/tests/test_clip_encoder.py -s
pytest ./fastvideo/v1/tests/test_llama_encoder.py -s

Both tests:
pytest ./fastvideo/v1/tests/ --ignore=./fastvideo/v1/tests/old_tests/ -s


Added a Github Actions workflow for running tests on PRs with RunPod (only works with the two encoder tests currently):

  • Makes requests to RunPod to create a pod with specified resources (GPU type, count, volume/disk size, etc.) for the duration of the workflow job
  • Created instance will run commands specified in the job
image

@kevin314 kevin314 changed the title Set up text encoder tests to work with pytest Set up text encoder tests to work with pytest and Github Actions Apr 1, 2025
@SolitaryThinker SolitaryThinker marked this pull request as ready for review April 1, 2025 21:56
Copy link
Collaborator

@SolitaryThinker SolitaryThinker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might be running in to some consistency issues with secrets. Going to merge and open new PR to test

@SolitaryThinker SolitaryThinker merged commit 708201f into hao-ai-lab:main Apr 2, 2025
0 of 7 checks passed
@zhisbug
Copy link
Collaborator

zhisbug commented Apr 2, 2025

Just seeking clarification: So basically the GPU runner pod is created on-the-fly when a CI job is launched?

@kevin314
Copy link
Collaborator Author

kevin314 commented Apr 3, 2025

@zhisbug When a CI job is launched, the Github "runner" instance that executes the job is created first for free by Github, and then that runner creates the RunPod instance with GPUs which are shut down after the job finishes

kevin314 added a commit to kevin314/FastVideo that referenced this pull request Apr 4, 2025
qimcis pushed a commit to qimcis/FastVideo that referenced this pull request Oct 30, 2025
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.

3 participants