Skip to content

Commit

Permalink
Remove log rotation script from gcsfuse long haul tests (#1543)
Browse files Browse the repository at this point in the history
* remove log rotation script from gcsfuse long haul tests as it is done by default

* review comment
  • Loading branch information
ashmeenkaur authored and gargnitingoogle committed Jan 4, 2024
1 parent 50729c0 commit 3ae47db
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 91 deletions.
3 changes: 0 additions & 3 deletions perfmetrics/scripts/ml_tests/pytorch/run_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,5 @@ echo "Running the docker image build in the previous step..."
sudo docker run --gpus all --name=pytorch_automation_container --privileged -d -v $HOME/github/gcsfuse/container_artifacts:/pytorch_dino/run_artifacts:rw,rshared \
--shm-size=128g pytorch-gcsfuse:latest

# Setup the log_rotation.
source perfmetrics/scripts/ml_tests/setup_log_rotation.sh $HOME/github/gcsfuse/container_artifacts/gcsfuse.log

# Wait for the script completion as well as logs output.
sudo docker logs -f pytorch_automation_container
23 changes: 13 additions & 10 deletions perfmetrics/scripts/ml_tests/pytorch/run_model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,26 @@ cd -
# Create a directory for gcsfuse logs
mkdir run_artifacts/gcsfuse_logs

config_filename=/pytorch_dino/gcsfuse/gcsfuse-config.yaml
cat > $config_filename << EOF
metadata-cache:
ttl-secs: 1728000
EOF
echo "Created config-file at "$config_filename

echo "Mounting GCSFuse..."

config_filename=/tmp/gcsfuse_config.yaml
echo "logging:
file-path: run_artifacts/gcsfuse.log
format: text
severity: trace
log-rotate:
max-file-size-mb: 1024
backup-file-count: 3
compress: true
metadata-cache:
ttl-secs: 1728000 " > $config_filename
echo "Created config-file at "$config_filename
nohup /pytorch_dino/gcsfuse/gcsfuse --foreground \
--stat-cache-capacity=1320000 \
--stackdriver-export-interval=60s \
--implicit-dirs \
--max-conns-per-host=100 \
--debug_fuse \
--debug_gcs \
--log-file run_artifacts/gcsfuse.log \
--log-format text \
--config-file $config_filename \
gcsfuse-ml-data gcsfuse_data > "run_artifacts/gcsfuse.out" 2> "run_artifacts/gcsfuse.err" &

Expand Down
53 changes: 0 additions & 53 deletions perfmetrics/scripts/ml_tests/setup_log_rotation.sh

This file was deleted.

21 changes: 0 additions & 21 deletions perfmetrics/scripts/ml_tests/smart_log_deleter.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,5 @@ sudo docker run --gpus all --name tf_model_container --privileged -d \
-v $HOME/github/gcsfuse/container_artifacts/logs:/home/logs:rw,rshared \
-v $HOME/github/gcsfuse/container_artifacts/output:/home/output:rw,rshared --shm-size=24g tf-dlc-gcsfuse:latest

# Setup the log_rotation.
source perfmetrics/scripts/ml_tests/setup_log_rotation.sh $HOME/github/gcsfuse/container_artifacts/logs/gcsfuse.log

# Wait for the script completion as well as logs output.
sudo docker logs -f tf_model_container
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@ cd -

# Mount the bucket and run in background so that docker doesn't keep running after resnet_runner.py fails
echo "Mounting the bucket"
nohup gcsfuse/gcsfuse --foreground --implicit-dirs --debug_fuse --debug_gcs --max-conns-per-host 100 --log-format "text" --log-file /home/logs/gcsfuse.log --stackdriver-export-interval 60s ml-models-data-gcsfuse myBucket > /home/output/gcsfuse.out 2> /home/output/gcsfuse.err &
echo "logging:
file-path: /home/logs/gcsfuse.log
format: text
severity: trace
log-rotate:
max-file-size-mb: 1024
backup-file-count: 3
compress: true
" > /tmp/gcsfuse_config.yaml
nohup gcsfuse/gcsfuse --foreground \
--implicit-dirs \
--max-conns-per-host 100 \
--stackdriver-export-interval 60s \
--config-file /tmp/gcsfuse_config.yaml \
ml-models-data-gcsfuse myBucket > /home/output/gcsfuse.out 2> /home/output/gcsfuse.err &

# Install tensorflow model garden library
pip3 install --user tf-models-official==2.13.2
Expand Down

0 comments on commit 3ae47db

Please sign in to comment.