Skip to content

Commit 36ee528

Browse files
Merge pull request #2720 from PAenugula:main
PiperOrigin-RevId: 834853079
2 parents 05abc90 + c27e697 commit 36ee528

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tools/setup/setup_gcsfuse.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,24 @@ if [[ -d ${MOUNT_PATH} ]]; then
4242
fi
4343

4444
mkdir -p $MOUNT_PATH
45+
MAXTEXT_VERSION=$(pip list | grep '^MaxText ' | awk '{print $2}')
46+
if [[ -z "$MAXTEXT_VERSION" ]]; then
47+
MAXTEXT_VERSION="unknown"
48+
fi
49+
GRAIN_VERSION=$(pip list | grep '^grain ' | awk '{print $2}')
50+
if [[ -z "$GRAIN_VERSION" ]]; then
51+
GRAIN_VERSION="unknown"
52+
fi
53+
54+
APP_NAME="maxtext-gcsfuse/maxtext-$MAXTEXT_VERSION/grain-$GRAIN_VERSION"
55+
56+
4557

4658
# see https://cloud.google.com/storage/docs/gcsfuse-cli for all configurable options of gcsfuse CLI
4759
TIMESTAMP=$(date +%Y%m%d-%H%M)
4860
gcsfuse -o ro --implicit-dirs --log-severity=debug \
4961
--type-cache-max-size-mb=-1 --stat-cache-max-size-mb=-1 --kernel-list-cache-ttl-secs=-1 --metadata-cache-ttl-secs=-1 \
50-
--log-file=$HOME/gcsfuse_$TIMESTAMP.json "$DATASET_GCS_BUCKET" "$MOUNT_PATH"
62+
--log-file=$HOME/gcsfuse_$TIMESTAMP.json --app-name=$APP_NAME "$DATASET_GCS_BUCKET" "$MOUNT_PATH"
5163

5264
# Use ls to prefill the metadata cache: https://cloud.google.com/storage/docs/cloud-storage-fuse/performance#improve-first-time-reads
5365
if [[ ! -z ${FILE_PATH} ]] ; then

0 commit comments

Comments
 (0)