-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add integration tests for PyTorch, TGI and TEI DLCs #79
base: main
Are you sure you want to change the base?
Conversation
As it will be reused within the TGI and TEI tests
Pass args via `text_generation_launcher_kwargs` and include the VertexAI environment mimic via the `AIP_` environment variables.
181b21c
to
83e2c95
Compare
157ab15
to
9446a3e
Compare
Which is odd, since `jinja2` is a core dependency of `transformers`, see https://github.com/huggingface/transformers/blob/174890280b340b89c5bfa092f6b4fb0e2dc2d7fc/setup.py#L127
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.
Great work. Added some minor comments
- name: Set up uv | ||
run: | | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
export PATH=$HOME/.cargo/bin:$PATH | ||
uv --version | ||
|
||
- name: Install dependencies | ||
run: | | ||
uv venv --python 3.10 | ||
uv pip install -r tests/requirements.txt |
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.
should we add a "cache"?
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.
AFAIK the VMs are ephemeral so the cache would be destroyed after each job is done, and uv
is already pretty fast (downloads those under 10 seconds).
training-dlc: us-docker.pkg.dev/deeplearning-platform-release/gcr.io/huggingface-pytorch-training-cu121.transformers.4-42.ubuntu2204.py310 | ||
inference-dlc: us-docker.pkg.dev/deeplearning-platform-release/gcr.io/huggingface-pytorch-inference-cu121.2-2.transformers.4-44.ubuntu2204.py311 | ||
tgi-dlc: us-docker.pkg.dev/deeplearning-platform-release/gcr.io/huggingface-text-generation-inference-cu121.2-2.ubuntu2204.py310 |
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.
Mhm is there a better way to specify those? Feels like we can easily forget updating them?
- Capture `container_uri` from environment variable before running testand remove the default value to prevent issues when testing - Remove `max_train_epochs=-1` as not required since `max_steps` isalready specified - Rename `test_transformers` to `test_huggingface_inference_toolkit` - Remove `transformers` and `jinja2` dependencies as not required, as well as `AutoTokenizer` usage for prompt formatting Co-authored-by: Philipp Schmid <[email protected]>
3af2bcf
to
7ce5aeb
Compare
6eb06b5
to
349df29
Compare
…ia-smi` Those dependencies where not needed, not actively maintained and adding extra complexity; instead, it has been replaced with `subprocess` running `nvidia-smi`.
- TEI condition on container port was reversed - `gpu_available` raises exception instead of `returncode` if command doesn't exist
In most of the cases, splitting those is for the best and to reduce execution time, assuming we tend to update the DLCs one at a time, so it's not really probable for all the containers to change at once. Pros: easier to manage, more granular, no need for extra `docker pull`s, just runs what's modified Cons: when modifying a bunch of tests it will be slower as `docker pull` needs to be done per each test as instances are ephemeral
The `type: choice` with `options` is only supported for `workflow_dispatch` i.e. when triggering the GitHub Action manually; not via `workflow_call` i.e. when the workflow is just reused from another workflow.
Description
This PR adds some integration tests for the following Hugging Face DLCs on Google Cloud:
The tests related to the inference try different alternatives, as well as emulate the Vertex AI environments via the
AIP_
environment variables exposed by Vertex AI and handled within the Hugging Face DLCs on Google Cloud for a seamless integration.