Skip to content

Commit

Permalink
[Examples] Editing readme (#1161)
Browse files Browse the repository at this point in the history
*Issue #, if available:*

Editing readme for consistency across commands.

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
  • Loading branch information
RonaldBXu authored Feb 12, 2025
1 parent 72f11f3 commit 5d32d67
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions examples/sagemaker-pipelines-graphbolt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ PIPELINE_NAME="ogbn-arxiv-gs-pipeline"

python ~/graphstorm/sagemaker/pipeline/execute_sm_pipeline.py \
--pipeline-name $PIPELINE_NAME \
--region us-east-1 \
--region $REGION \
--local-execution | tee arxiv-local-logs.txt
```

Expand Down Expand Up @@ -365,7 +365,11 @@ You can inspect the mean epoch and evaluation time using the provided `analyze_t

```bash
python analyze_training_time.py --log-file arxiv-local-logs.txt
```

Your output will look like

```
Reading logs from file: arxiv-logs.txt
=== Training Epochs Summary ===
Expand All @@ -389,10 +393,9 @@ You can use the same pipeline creation script, but change two variables, providi
```bash
# Deploy the GraphBolt-enabled pipeline
PIPELINE_NAME_GRAPHBOLT="ogbn-arxiv-gs-graphbolt-pipeline"
BUCKET_NAME="my-s3-bucket"
bash deploy_arxiv_pipeline.sh \
--account "<aws-account-id>" \
--bucket-name $BUCKET_NAME --role "<execution-role>" \
--account $ACCOUNT_ID \
--bucket-name $BUCKET_NAME --role $SAGEMAKER_EXECUTION_ROLE_ARN \
--pipeline-name $PIPELINE_NAME_GRAPHBOLT \
--use-graphbolt true
# Execute the pipeline locally
Expand All @@ -406,7 +409,11 @@ Analyzing the training logs you can see a noticeable reduction in per-epoch time

```bash
python analyze_training_time.py --log-file arxiv-local-gb-logs.txt
```

Your output will look like

```
Reading logs from file: arxiv-gb-logs.txt
=== Training Epochs Summary ===
Expand Down Expand Up @@ -455,8 +462,8 @@ Now you are ready to deploy your initial pipeline for papers-100M
PIPELINE_NAME="ogb-papers100M-pipeline"
cd ~/graphstorm/examples/sagemaker-pipelines-graphbolt/
bash deploy_papers100M_pipeline.sh \
--account <aws-account-id> \
--bucket-name <s3-bucket> --role <execution-role> \
--account $ACCOUNT_ID \
--bucket-name $BUCKET_NAME --role $SAGEMAKER_EXECUTION_ROLE_ARN \
--pipeline-name $PIPELINE_NAME \
--use-graphbolt false
```
Expand All @@ -466,7 +473,7 @@ Execute the pipeline and let it run the background.
```bash
python ~/graphstorm/sagemaker/pipeline/execute_sm_pipeline.py \
--pipeline-name $PIPELINE_NAME \
--region us-east-1
--region $REGION
--async-execution
```

Expand All @@ -478,15 +485,15 @@ Next, you can deploy and execute another pipeline, now with GraphBolt enabled:
```bash
PIPELINE_NAME_GRAPHBOLT="ogb-papers100M-graphbolt-pipeline"
bash deploy_papers100M_pipeline.sh \
--account <aws-account-id> \
--bucket-name <s3-bucket> --role <execution-role> \
--account $ACCOUNT_ID \
--bucket-name $BUCKET_NAME --role $SAGEMAKER_EXECUTION_ROLE_ARN \
--pipeline-name $PIPELINE_NAME_GRAPHBOLT \
--use-graphbolt true

# Execute the GraphBolt-enabled pipeline on SageMaker
python ~/graphstorm/sagemaker/pipeline/execute_sm_pipeline.py \
--pipeline-name $PIPELINE_NAME_GRAPHBOLT \
--region us-east-1 \
--region $REGION \
--async-execution
```

Expand All @@ -500,12 +507,12 @@ The easiest way to do so is through the Studio pipeline interface. In the Pipeli
```bash
python analyze_training_time.py \
--pipeline-name $PIPELINE_NAME \
--execution-name execution-1734404366941
--execution-name <execution-name>
```

Your output will look like

```bash
```
== Training Epochs Summary ===
Total epochs completed: 15
Average epoch time: 73.95 seconds
Expand All @@ -520,12 +527,12 @@ Now do the same for the GraphBolt-enabled pipeline:
```bash
python analyze_training_time.py \
--pipeline-name $PIPELINE_NAME_GRAPHBOLT \
--execution-name execution-1734463209078
--execution-name <execution-name>
```

You will see the improved per-epoch and evaluation times:

```bash
```
== Training Epochs Summary ===
Total epochs completed: 15
Average epoch time: 54.54 seconds
Expand Down

0 comments on commit 5d32d67

Please sign in to comment.