Skip to content

Commit 17c5171

Browse files
committed
doc: scenario documentation
1 parent 646d910 commit 17c5171

File tree

3 files changed

+102
-0
lines changed

3 files changed

+102
-0
lines changed

docs/scenarios/2.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# The CodeFlare Stack - Scenario 2
2+
3+
### Pre-Train a RoBERTa Language Model from Pre-tokenized Data (Using Demo Data)
4+
5+
[RoBERTa](https://huggingface.co/docs/transformers/model_doc/roberta)
6+
is a robustly optimized method for pretraining natural language
7+
processing (NLP) systems.
8+
9+
**Goals**: Learning about CodeFlare<br>
10+
**You Provide**: nothing, it just works!<br>
11+
**CodeFlare Stack Provides**: [S3](https://aws.amazon.com/s3/) data **|** [Ray](https://www.ray.io/) cluster **|** [Kubernetes](https://kubernetes.io/) management **|** Distributed training job **|** Pop-up Dashboards
12+
13+
---
14+
15+
To start:
16+
17+
```shell
18+
codeflare ml/codeflare/training/roberta
19+
```
20+
21+
### CLI In Action
22+
23+
You may run the CodeFlare RoBERTa model architecture against sample
24+
data, as we have done in these recordings:
25+
26+
<a href="https://asciinema.org/a/517993" target="_blank"><img src="https://asciinema.org/a/517993.svg" width="600" /></a>
27+
28+
### Pop-up CodeFlare Dashboard In Action
29+
30+
https://user-images.githubusercontent.com/4741620/187531069-12a5dbd3-1b3f-45e8-b8e9-d0940bdc7db1.mp4
31+
32+
[Back to Top](README.md)

docs/scenarios/3.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# The CodeFlare Stack - Scenario 3
2+
3+
### Bring Your Own Code
4+
5+
I have my own training code, and want to run it at scale.
6+
7+
**Goals**: Productive Use<br>
8+
**You Provide**: Python source code **|** [S3](https://aws.amazon.com/s3/) data **|** Command-line options to tweak the run parameters <br>
9+
**CodeFlare Stack Provides**: [Ray](https://www.ray.io/) cluster **|** [Kubernetes](https://kubernetes.io/) management **|** Distributed training job **|** Link S3 credentials **|** Pop-up Dashboards
10+
11+
---
12+
13+
This example utilizes the "bring your own code" feature of the
14+
CodeFlare Stack. We will point the CLI to
15+
[this](https://torchtutorialstaging.z5.web.core.windows.net/beginner/hyperparameter_tuning_tutorial.html)
16+
simple example that uses Ray Tune. In this mode, you point the CLI
17+
tool to a working directory that contains a `main.py` and (optionally)
18+
a `requirements.txt`. Make a local directory and download those two
19+
files from
20+
[here](https://github.com/project-codeflare/codeflare-cli/tree/main/tests/kind/inputs/ray-tune-tutorial):
21+
22+
This script mimics "bringing your own code". Normally, you would have
23+
the code already sitting in a directory on your laptop:
24+
25+
```shell
26+
mkdir codeflare-scenario-1 && cd codeflare-scenario-1
27+
curl -LO https://raw.githubusercontent.com/project-codeflare/codeflare-cli/main/tests/kind/inputs/ray-tune-tutorial/main.py
28+
curl -LO https://raw.githubusercontent.com/project-codeflare/codeflare-cli/main/tests/kind/inputs/ray-tune-tutorial/requirements.txt
29+
```
30+
31+
Then launch the `codeflare` CLI and point it to your directory:
32+
33+
```
34+
codeflare ml/codeflare/training/byoc
35+
```
36+
37+
### The CLI In Action
38+
39+
<a href="https://asciinema.org/a/517989" target="_blank"><img src="https://asciinema.org/a/517989.svg" width="600" /></a>
40+
41+
### Pop-up CodeFlare Dashboard In Action
42+
43+
https://user-images.githubusercontent.com/4741620/187532373-556dd733-7eef-4b70-81e1-b841289535da.mp4
44+
45+
[Back to Top](README.md)

docs/scenarios/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# The CodeFlare Stack
2+
3+
The CodeFlare Stack is a set of tooling and best of breed code and
4+
models to help you be productive at leveraging Cloud GPU resources for
5+
ML tasks.
6+
7+
## How can I Leverage the CodeFlare Stack?
8+
9+
The CodeFlare Stack is set up to accommodate _your choices_. So,
10+
first, choose what you would like to accomplish:
11+
12+
- [**Introductory Demo**](1.md) I want to see the experience in action. <br>
13+
**Goals**: Learning<br>
14+
**You Provide**: nothing, it just works! <br>
15+
**CodeFlare Stack Provides**: [Ray](https://www.ray.io/) cluster **|** [Kubernetes](https://kubernetes.io/) management **|** Distributed training job **|** Pop-up Dashboards
16+
- [**Train a Masked Language Model (Demo)**](2.md)<br>
17+
**Goals**: Learning<br>
18+
**You Provide**: nothing, it just works!<br>
19+
**CodeFlare Stack Provides**: [S3](https://aws.amazon.com/s3/) data **|** [Ray](https://www.ray.io/) cluster **|** [Kubernetes](https://kubernetes.io/) management **|** Distributed training job **|** Pop-up Dashboards
20+
21+
- [**Bring Your Own Code**](3.md) I have my own training code, and
22+
want to run it at scale. <br>
23+
**Goals**: Productive Use<br>
24+
**You Provide**: Python source code **|** [S3](https://aws.amazon.com/s3/) data **|** Command-line options to tweak the run parameters <br>
25+
**CodeFlare Stack Provides**: [Ray](https://www.ray.io/) cluster **|** [Kubernetes](https://kubernetes.io/) management **|** Distributed training job **|** Link S3 credentials **|** Pop-up Dashboards

0 commit comments

Comments
 (0)