<commit_before>#!/bin/bash
set -e

if [ -z "$CACHE_CONTEXT" ]; then
  echo "Set CACHE_CONTEXT and try again."
  exit 1
fi

if [ -z "$CACHE_PATH" ]; then
  echo "Set CACHE_PATH and try again."
  exit 1
fi

ARCHIVE=${CACHE_CONTEXT}-cache.tar.gz
HASHES=${CACHE_CONTEXT}-hashes.txt

init-gce-creds
if ! download-cache $CACHE_CONTEXT $ARCHIVE ; then
  echo "Downloading cache failed, starting with empty dir."
  mkdir -p $CACHE_PATH
  touch $CACHE_PATH/keepme
else
  echo "Extracting cache..."
  tar -zxf $ARCHIVE -C $CACHE_PATH
  rm $ARCHIVE
fi

echo "Recording hashes..."
record-cache $TO_CACHE ${CACHE_CONTEXT}-hashes.txt<commit_msg>jenkins: fix typo in init_caches<commit_after>#!/bin/bash
set -e

if [ -z "$CACHE_CONTEXT" ]; then
  echo "Set CACHE_CONTEXT and try again."
  exit 1
fi

if [ -z "$CACHE_PATH" ]; then
  echo "Set CACHE_PATH and try again."
  exit 1
fi

ARCHIVE=${CACHE_CONTEXT}-cache.tar.gz
HASHES=${CACHE_CONTEXT}-hashes.txt

init-gce-creds
if ! download-cache $CACHE_CONTEXT $ARCHIVE ; then
  echo "Downloading cache failed, starting with empty dir."
  mkdir -p $CACHE_PATH
  touch $CACHE_PATH/keepme
else
  echo "Extracting cache..."
  tar -zxf $ARCHIVE -C $CACHE_PATH
  rm $ARCHIVE
fi

echo "Recording hashes..."
record-cache $CACHE_PATH ${CACHE_CONTEXT}-hashes.txt
{'fraction_non_alphanumeric': 0.12236944660950896, 'fraction_numerical': 0.003117692907248636, 'mean_word_length': 3.9575289575289574, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4191801', 'n_tokens_mistral': 469, 'n_tokens_neox': 470, 'n_words': 139}