Skip to content

Commit

Permalink
small fixes and adding licence
Browse files Browse the repository at this point in the history
  • Loading branch information
Tulsishah committed Nov 21, 2023
1 parent 4fc2deb commit 68b3225
Show file tree
Hide file tree
Showing 12 changed files with 237 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#!/bin/bash
# Copyright 2023 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This will stop execution when any command will have non-zero status.
set -e

VM_NAME="pytorch-dino-7d"
ZONE_NAME="us-west1-b"
ARTIFACTS_BUCKET_PATH="gs://gcsfuse-ml-tests-logs/ci_artifacts/pytorch/pytorch1_12/dino"
TEST_SCRIPT_PATH="github/gcsfuse/perfmetrics/scripts/ml_tests/pytorch/pytorch1_12/dino/setup_host_and_run_model.sh"
TEST_SCRIPT_PATH="github/gcsfuse/perfmetrics/scripts/ml_tests/pytorch/pytorch1_12/dino/setup_host.sh"

cd "${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts/continuous_test/ml_tests"
cd "${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts/continuous_test/ml_tests/"

source run_and_manage_test.sh $VM_NAME $ZONE_NAME $ARTIFACTS_BUCKET_PATH $TEST_SCRIPT_PATH

Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

build_file: "gcsfuse/perfmetrics/scripts/continuous_test/ml_tests/pytorch/pytorch1_12/dino/build.sh"

# 2 hours timeout.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
#!/bin/bash
# Copyright 2023 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This will stop execution when any command will have non-zero status.
set -e

VM_NAME="pytorch2-dino-7d"
ZONE_NAME="us-west1-a"
ARTIFACTS_BUCKET_PATH="gs://gcsfuse-ml-tests-logs/ci_artifacts/pytorch/pytorch2/dino"
TEST_SCRIPT_PATH="github/gcsfuse/perfmetrics/scripts/ml_tests/pytorch/pytorch2/dino/setup_host_and_run_model.sh"
TEST_SCRIPT_PATH="github/gcsfuse/perfmetrics/scripts/ml_tests/pytorch/pytorch2/dino/setup_host.sh"
PYTORCH_2="pytorch2"

cd "${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts/continuous_test/ml_tests/"

source run_and_manage_test.sh $VM_NAME $ZONE_NAME $ARTIFACTS_BUCKET_PATH $TEST_SCRIPT_PATH $PYTORCH_2
source run_and_manage_test.sh $VM_NAME $ZONE_NAME $ARTIFACTS_BUCKET_PATH $TEST_SCRIPT_PATH $PYTORCH_2
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

build_file: "gcsfuse/perfmetrics/scripts/continuous_test/ml_tests/pytorch/pytorch2/dino/build.sh"

# 2 hours timeout.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function delete_existing_vm_and_create_new () {

echo "Creating VM $VM_NAME in zone $ZONE_NAME"
# The below command creates VM using the reservation 'ai-ml-tests'
if [[ $PYTORCH_2 == "pytorch2" ]];
if [ $PYTORCH_2 == "pytorch2" ];
then
# NVIDIA A100 40GB GPU type machine is currently unavailable due to global shortage.
# Creating NVIDIA L4 machines which are available on us-west1-1 zone.
Expand Down Expand Up @@ -159,12 +159,13 @@ exit_status=0
# START to START: If model run is not triggerred due to some error.
# START to RUNNING: If model is successfully triggerred on GPU. This state is
# changed by setup_host.sh that runs inside docker container of test VM.
current_status="START"
if [ $current_status == "START" ];
then
echo "Update commit Id for the run"
commit_id=$(git rev-parse HEAD)
echo $commit_id > commit.txt
gsutil cp commit.txt $ARTIFACTS_BUCKET_PATH/
# commit_id=$(git rev-parse HEAD)
# echo $commit_id > commit.txt
# gsutil cp commit.txt $ARTIFACTS_BUCKET_PATH/

delete_existing_vm_and_create_new

Expand Down
111 changes: 111 additions & 0 deletions perfmetrics/scripts/job_files/seq_rand_read_write.fio
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,114 @@ directory=gcs/256kb
filesize=256k
rw=write
numjobs=40

[3_thread]
stonewall
startdelay=500
directory=gcs/3mb
filesize=3M
numjobs=40

[4_thread]
stonewall
startdelay=690
directory=gcs/3mb
filesize=3M
rw=write
numjobs=40

[5_thread]
stonewall
startdelay=880
directory=gcs/5mb
filesize=5M
numjobs=40

[6_thread]
stonewall
startdelay=1070
directory=gcs/5mb
filesize=5M
rw=write
numjobs=40

[7_thread]
stonewall
startdelay=1260
directory=gcs/50mb
filesize=50M
numjobs=40

[8_thread]
stonewall
startdelay=1450
directory=gcs/50mb
filesize=50M
rw=write
numjobs=40

[9_thread]
stonewall
startdelay=1640
bs=16k
directory=gcs/256kb
filesize=256k
rw=randread
numjobs=40

[10_thread]
stonewall
startdelay=1830
bs=16k
directory=gcs/256kb
filesize=256k
rw=randwrite
numjobs=40

[11_thread]
stonewall
startdelay=2020
directory=gcs/3mb
filesize=3M
rw=randread
numjobs=40

[12_thread]
stonewall
startdelay=2210
directory=gcs/3mb
filesize=3M
rw=randwrite
numjobs=40

[13_thread]
stonewall
startdelay=2400
directory=gcs/5mb
filesize=5M
rw=randread
numjobs=40

[14_thread]
stonewall
startdelay=2590
directory=gcs/5mb
filesize=5M
rw=randwrite
numjobs=40

[15_thread]
stonewall
startdelay=2780
directory=gcs/50mb
filesize=50M
rw=randread
numjobs=40

[16_thread]
stonewall
startdelay=2970
directory=gcs/50mb
filesize=50M
rw=randwrite
numjobs=40
56 changes: 55 additions & 1 deletion perfmetrics/scripts/ls_metrics/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "integration-test-tulsishah-2" ,
"name": "list-benchmark-tests" ,
"num_folders": 11 ,
"folders": [
{
Expand All @@ -13,6 +13,60 @@
"num_files": 2000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
} ,
{
"name": "1KB_3000files_0subdir" ,
"num_files": 3000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
} ,
{
"name": "1KB_5000files_0subdir" ,
"num_files": 5000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
} ,
{
"name": "1KB_10000files_0subdir" ,
"num_files": 10000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
} ,
{
"name": "1KB_25000files_0subdir" ,
"num_files": 25000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
} ,
{
"name": "1KB_35000files_0subdir" ,
"num_files": 35000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
} ,
{
"name": "1KB_50000files_0subdir" ,
"num_files": 50000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
} ,
{
"name": "1KB_75000files_0subdir" ,
"num_files": 75000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
} ,
{
"name": "1KB_100000files_0subdir" ,
"num_files": 100000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
} ,
{
"name": "1KB_200000files_0subdir" ,
"num_files": 200000 ,
"file_name_prefix": "file" ,
"file_size": "1kb"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ WORKDIR "/pytorch_dino/"

RUN git clone "https://github.com/facebookresearch/dino"

COPY perfmetrics/scripts/ml_tests/pytorch/dino/setup_container.sh ./
COPY perfmetrics/scripts/ml_tests/pytorch/setup_container.sh ./

RUN mkdir -p "run_artifacts"
RUN mkdir -p "gcsfuse_data"

ENTRYPOINT ["/bin/bash", "-c", "./setup_container.sh", "pytorch1_12","python3.7"]
ENTRYPOINT ["/bin/bash", "-c", "./setup_container.sh pytorch1_12 python3.7"]
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ cd "$HOME/github/gcsfuse/perfmetrics/scripts"
echo "Setting up the machine with Docker and Nvidia Driver"
source ml_tests/setup_host.sh

source ml_tests/pytorch/run_model.sh
source ml_tests/pytorch/run_model.sh "pytorch1_12"
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ COPY perfmetrics/scripts/ml_tests/pytorch/setup_container.sh ./
RUN mkdir -p "run_artifacts"
RUN mkdir -p "gcsfuse_data"

ENTRYPOINT ["/bin/bash", "-c", "./setup_container.sh","pytorch2","python3.10"]
ENTRYPOINT ["/bin/bash", "-c", "./setup_container.sh pytorch2 python3.10"]
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ echo "Setting up the machine with Docker and Nvidia Driver"
DRIVER_VERSION="525.60.13"
source ml_tests/setup_host.sh $DRIVER_VERSION

source ml_tests/pytorch/run_model.sh
source ml_tests/pytorch/run_model.sh "pytorch2"
5 changes: 3 additions & 2 deletions perfmetrics/scripts/ml_tests/pytorch/run_model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e
PYTORCH_VESRION=$1
cd "$HOME/github/gcsfuse"
echo "Building docker image containing all pytorch libraries..."
sudo docker build . -f perfmetrics/scripts/ml_tests/pytorch/dino/Dockerfile --tag pytorch-gcsfuse
sudo docker build . -f perfmetrics/scripts/ml_tests/pytorch/${PYTORCH_VESRION}/dino/Dockerfile --tag pytorch-gcsfuse

mkdir -p container_artifacts

Expand Down

0 comments on commit 68b3225

Please sign in to comment.