Skip to content

Commit

Permalink
[AIR] HuggingFace Text Classification example (ray-project#24402)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yard1 authored May 18, 2022
1 parent 1325cf7 commit 1d5e6d9
Show file tree
Hide file tree
Showing 10 changed files with 1,601 additions and 73 deletions.
6 changes: 2 additions & 4 deletions .buildkite/pipeline.gpu.large.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
conditions: ["RAY_CI_TRAIN_AFFECTED"]
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- PYTHON=3.6 TRAIN_TESTING=1 TUNE_TESTING=1 INSTALL_HOROVOD=1 ./ci/env/install-dependencies.sh
- PYTHON=3.7 TRAIN_TESTING=1 TUNE_TESTING=1 INSTALL_HOROVOD=1 ./ci/env/install-dependencies.sh
# Because Python version changed, we need to re-install Ray here
- rm -rf ./python/ray/thirdparty_files; rm -rf ./python/ray/pickle5_files; ./ci/ci.sh build
- pip install -Ur ./python/requirements_ml_docker.txt
Expand Down Expand Up @@ -49,6 +49,4 @@
- DOC_TESTING=1 TRAIN_TESTING=1 TUNE_TESTING=1 PYTHON=3.7 ./ci/env/install-dependencies.sh
- pip install -Ur ./python/requirements_ml_docker.txt
- ./ci/env/env_info.sh
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=gpu,-tf,-pytorch,-py37,-post_wheel_build doc/...
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=gpu,tf,-pytorch,-py37,-post_wheel_build doc/...
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=gpu,-tf,pytorch,-py37,-post_wheel_build doc/...
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=gpu,-py37,-post_wheel_build doc/...
4 changes: 1 addition & 3 deletions .buildkite/pipeline.ml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,4 @@
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- DOC_TESTING=1 PYTHON=3.7 ./ci/env/install-dependencies.sh
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=-gpu,-tf,-pytorch,-py37,-post_wheel_build doc/...
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=-gpu,tf,-pytorch,-py37,-post_wheel_build doc/...
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=-gpu,-tf,pytorch,-py37,-post_wheel_build doc/...
- bazel test --config=ci $(./ci/run/bazel_export_options) --build_tests_only --test_tag_filters=-gpu,-py37,-post_wheel_build doc/...
2 changes: 2 additions & 0 deletions doc/source/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ parts:
sections:
- file: ray-air/examples/analyze_tuning_results
title: "Analyze hyperparameter tuning results"
- file: ray-air/examples/huggingface_text_classification
title: "Fine-tune a 🤗 Transformers model"
- file: ray-air/package-ref
- file: ray-more-libs/joblib
- file: ray-more-libs/lightgbm-ray
Expand Down
13 changes: 12 additions & 1 deletion doc/source/ray-air/examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ filegroup(
py_test_run_all_notebooks(
size = "large",
include = ["*.ipynb"],
exclude = [],
exclude = ["huggingface_text_classification.ipynb"],
data = ["//doc/source/ray-air/examples:air_examples"],
tags = ["exclusive", "team:ml"],
)


# GPU Tests

py_test_run_all_notebooks(
size = "large",
include = ["huggingface_text_classification.ipynb"],
exclude = [],
data = ["//doc/source/ray-air/examples:air_examples"],
tags = ["exclusive", "team:ml", "gpu"],
)
Loading

0 comments on commit 1d5e6d9

Please sign in to comment.