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

[Doc] Fix Title of the Transformers GLUE example #39605

Merged
merged 5 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/source/train/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Intermediate
- `DreamBooth fine-tuning of Stable Diffusion with Ray Train <https://github.com/ray-project/ray/tree/master/doc/source/templates/05_dreambooth_finetuning>`_
* - Lightning
- :ref:`Model Training with PyTorch Lightning and Ray Data <lightning_advanced_example>`
* - Accelerate
- :ref:`Fine-tuning a Text Classifier on GLUE Benchmark with HF Accelerate. <train_transformers_accelerate_example>`
* - Transformers
- :ref:`Fine-tuning a Text Classifier on GLUE Benchmark with HF Transformers. <train_transformers_glue_example>`


Advanced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"(train_transformers_accelerate_example)=\n",
"(train_transformers_glue_example)=\n",
"\n",
"# Fine-tune a 🤗 Transformers model"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
set_seed,
)

import ray.data
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the example not work without this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ray Data has a lazy import defined here, but I've never really understood if this should be something done by all libraries, no libraries, or some libraries.

Copy link
Member Author

@woshiyyya woshiyyya Sep 12, 2023

Choose a reason for hiding this comment

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

I've tried that after we import ray.train, we can freely call any methods of ray.data. Probably because we imported ray data in ray train.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ray Data can be accessed after import ray directly. Examples here

Copy link
Member Author

Choose a reason for hiding this comment

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

oh that makes sense now. Ray train import ray, then ray.data is lazily imported.

import ray.train
from ray.train import DataConfig, ScalingConfig, Checkpoint
from ray.train.torch import TorchTrainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
set_seed,
)

import ray.data
woshiyyya marked this conversation as resolved.
Show resolved Hide resolved
import ray.train
from ray.train import ScalingConfig, Checkpoint
from ray.train.torch import TorchTrainer
Expand Down
Loading