picocreator
commited on
Commit
•
6aa6f83
1
Parent(s):
f030095
updated compression / decompression scripts
Browse files
.gitattributes
CHANGED
@@ -54,7 +54,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
56 |
# Jsonl/log files
|
57 |
-
*.jsonl filter=lfs diff=lfs merge=lfs -text
|
58 |
*.log filter=lfs diff=lfs merge=lfs -text
|
59 |
-
**/*.
|
60 |
-
|
|
|
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
56 |
# Jsonl/log files
|
|
|
57 |
*.log filter=lfs diff=lfs merge=lfs -text
|
58 |
+
**/*.log filter=lfs diff=lfs merge=lfs -text
|
59 |
+
# .tar.gz files
|
60 |
+
**/*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
.gitignore
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
# Skip common hidden files
|
2 |
.*
|
3 |
|
|
|
|
|
|
|
4 |
# Allow back git related files
|
5 |
!.git*
|
|
|
1 |
# Skip common hidden files
|
2 |
.*
|
3 |
|
4 |
+
# Ignore jsonl files, they are too many/big, so we compress them
|
5 |
+
*.jsonl
|
6 |
+
|
7 |
# Allow back git related files
|
8 |
!.git*
|
scripts/{generate-result-jsonl-in-folder.sh → build-jsonl-archive-in-folder.sh}
RENAMED
File without changes
|
scripts/build-jsonl-files-from-archive.sh
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Check for argument representing the directory to perform the extraction operation in
|
4 |
+
if [ -z "$1" ]; then
|
5 |
+
echo "Please provide the directory to perform the extraction operation in"
|
6 |
+
exit 1
|
7 |
+
fi
|
8 |
+
|
9 |
+
# Go to the directory
|
10 |
+
cd "$1"
|
11 |
+
|
12 |
+
# Check if there is an existing result-jsonl.tar.gz file in the directory
|
13 |
+
if [ ! -f "result-jsonl.tar.gz" ]; then
|
14 |
+
echo "[SKIP] No result-jsonl.tar.gz file found in: $1"
|
15 |
+
exit 0
|
16 |
+
fi
|
17 |
+
|
18 |
+
# Extract the jsonl files
|
19 |
+
echo "[START] Extracting files from result-jsonl.tar.gz into $1"
|
20 |
+
tar -xzf result-jsonl.tar.gz
|
21 |
+
echo "[DONE] Files extracted from result-jsonl.tar.gz into $1"
|
scripts/compress-all-jsonl.sh
CHANGED
@@ -15,7 +15,7 @@ echo "==================================================="
|
|
15 |
find "$BASE_DIR" -type f -name '*.jsonl' | awk -F/ 'BEGIN{OFS="/"}{$NF=""; print $0}' | xargs -I {} readlink -f {} | sort -u | while read -r DIR
|
16 |
do
|
17 |
# Process each directory
|
18 |
-
"$SCRIPT_DIR/
|
19 |
done
|
20 |
|
21 |
# Sleep for 5 second to allow the background processes to start
|
@@ -23,6 +23,8 @@ sleep 5
|
|
23 |
|
24 |
# Wait for all background processes to finish
|
25 |
wait
|
|
|
|
|
26 |
|
27 |
# Sleep for 1 second to allow the background processes to finish / echo logs to flush, etc
|
28 |
sleep 1
|
|
|
15 |
find "$BASE_DIR" -type f -name '*.jsonl' | awk -F/ 'BEGIN{OFS="/"}{$NF=""; print $0}' | xargs -I {} readlink -f {} | sort -u | while read -r DIR
|
16 |
do
|
17 |
# Process each directory
|
18 |
+
bash "$SCRIPT_DIR/build-jsonl-archive-in-folder.sh" "$DIR" &
|
19 |
done
|
20 |
|
21 |
# Sleep for 5 second to allow the background processes to start
|
|
|
23 |
|
24 |
# Wait for all background processes to finish
|
25 |
wait
|
26 |
+
wait
|
27 |
+
wait
|
28 |
|
29 |
# Sleep for 1 second to allow the background processes to finish / echo logs to flush, etc
|
30 |
sleep 1
|
scripts/decompress-all-jsonl.sh
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Get the current script directory of the script
|
4 |
+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
5 |
+
|
6 |
+
# lm-eval-output dir
|
7 |
+
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
|
8 |
+
BASE_DIR="$PROJECT_DIR/lm-eval-output"
|
9 |
+
|
10 |
+
echo "==================================================="
|
11 |
+
echo "Decompressiong all result-jsonl.tar.gz files in $BASE_DIR"
|
12 |
+
echo "==================================================="
|
13 |
+
|
14 |
+
# Find all directories containing .jsonl files, without duplicates
|
15 |
+
find "$BASE_DIR" -type f -name 'result-jsonl.tar.gz' | awk -F/ 'BEGIN{OFS="/"}{$NF=""; print $0}' | xargs -I {} readlink -f {} | sort -u | while read -r DIR
|
16 |
+
do
|
17 |
+
# Process each directory
|
18 |
+
bash "$SCRIPT_DIR/build-jsonl-files-from-archive.sh" "$DIR" &
|
19 |
+
done
|
20 |
+
|
21 |
+
# Sleep for 5 second to allow the background processes to start
|
22 |
+
sleep 5
|
23 |
+
|
24 |
+
# Wait for all background processes to finish
|
25 |
+
wait
|
26 |
+
wait
|
27 |
+
wait
|
28 |
+
|
29 |
+
# Sleep for 1 second to allow the background processes to finish / echo logs to flush, etc
|
30 |
+
sleep 1
|
31 |
+
|
32 |
+
# Done
|
33 |
+
echo "==================================================="
|
34 |
+
echo "All jsonl files in $BASE_DIR have been unpacked"
|
35 |
+
echo "==================================================="
|