Skip to content

Commit cf4ad41

Browse files
committed
*: revert changes to frostt download script
We shouldn't add any dimensions to the front of the tns format, otherwise other tools can't parse it.
1 parent 5642c09 commit cf4ad41

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

download_frostt.sh

+4-21
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@ TENSOR_NAMES=(
99
"uber-pickups"
1010
)
1111

12-
# The tensor format from FROSTT is not self describing. Prepend
13-
# we'll prepend information about the dimensions to make it so.
14-
# This array should stay in line with the other arrays. In particular
15-
# it should contain the size of each dimension in the tensor, followed
16-
# by the number of non-zeros.
17-
TENSOR_DIMS=(
18-
"6186 24 77 32 5330673"
19-
"1605 4198 1631 4209 868131 1698825"
20-
"2482 2862 14036 17 3101609"
21-
"183 24 1140 1717 3309490"
22-
)
23-
2412
TENSOR_URLS=(
2513
"https://s3.us-east-2.amazonaws.com/frostt/frostt_data/chicago-crime/comm/chicago-crime-comm.tns.gz"
2614
"https://s3.us-east-2.amazonaws.com/frostt/frostt_data/lbnl-network/lbnl-network.tns.gz"
@@ -32,16 +20,11 @@ mkdir -p data/FROSTT
3220

3321
for i in ${!TENSOR_URLS[@]}; do
3422
name=${TENSOR_NAMES[$i]}
35-
dim=${TENSOR_DIMS[$i]}
3623
url=${TENSOR_URLS[$i]}
37-
outdir="data/FROSTT/$name"
38-
if [ -d "$outdir" ]; then
24+
out="data/FROSTT/$name.tns"
25+
if [ -f "$out" ]; then
3926
continue
4027
fi
41-
echo "Downloading tensor $name to $outdir"
42-
mkdir "$outdir"
43-
# Write the dimension to the file.
44-
echo "$dim" > "$outdir/tensor.frostt"
45-
# Append the rest of the data to the file.
46-
curl $url | gzip -d -c >> "$outdir/tensor.frostt"
28+
echo "Downloading tensor $name to $out"
29+
curl $url | gzip -d -c > "$out"
4730
done

0 commit comments

Comments
 (0)