Skip to content

Commit 1a3da17

Browse files
Update to using the app-name flag in the maxtext script.
PiperOrigin-RevId: 829115621
1 parent fca6e8f commit 1a3da17

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tools/setup/setup_gcsfuse.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,23 @@ 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+
4556

4657
# see https://cloud.google.com/storage/docs/gcsfuse-cli for all configurable options of gcsfuse CLI
4758
TIMESTAMP=$(date +%Y%m%d-%H%M)
4859
gcsfuse -o ro --implicit-dirs --log-severity=debug \
4960
--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"
61+
--log-file=$HOME/gcsfuse_$TIMESTAMP.json --app-name=$APP_NAME "$DATASET_GCS_BUCKET" "$MOUNT_PATH"
5162

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

0 commit comments

Comments
 (0)