Skip to content

Commit

Permalink
add tensorflow-probability to resource tar (#500)
Browse files Browse the repository at this point in the history
* add tensorflow-probability to resource tar
  • Loading branch information
yangxudong authored Nov 13, 2024
1 parent f6538c1 commit bad99f5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
1 change: 0 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ python:
- requirements: requirements/docs.txt
- method: setuptools
path: .
- tensorflow-probability
24 changes: 22 additions & 2 deletions pai_jobs/deploy_ext.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ fi
cp -R $root_dir/easy_rec ./easy_rec
sed -i -e "s/\[VERSION\]/$VERSION/g" easy_rec/__init__.py
find -L easy_rec -name "*.pyc" | xargs rm -rf
echo "tensorflow-probability==0.5.0" > requirements.txt

if [ ! -d "datahub" ]
then
Expand Down Expand Up @@ -144,7 +143,28 @@ then
rm -rf faiss.tar.gz
fi

tar -cvzhf $RES_PATH easy_rec datahub lz4 cprotobuf kafka faiss run.py requirements.txt
if [ ! -d "tensorflow_probability" ]
then
if [ $is_tf15 -gt 0 ]; then
tfp_version='0.8.0'
else
tfp_version='0.5.0'
fi
if [ ! -e "tensorflow_probability" ]
then
wget http://easyrec.oss-cn-beijing.aliyuncs.com/3rdparty/probability-${tfp_version}.tar.gz
if [ $? -ne 0 ]
then
echo "tensorflow_probability download failed."
fi
fi
tar -xzvf probability-${tfp_version}.tar.gz --strip-components=1 probability-${tfp_version}/tensorflow_probability
rm -rf tensorflow_probability/examples
rm -rf tensorflow_probability/g3doc
rm -rf probability-${tfp_version}.tar.gz
fi

tar -cvzhf $RES_PATH easy_rec datahub lz4 cprotobuf kafka faiss tensorflow_probability run.py

# 2 means generate only
if [ $mode -ne 2 ]
Expand Down
1 change: 1 addition & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ recommonmark==0.6.0
sphinx==5.1.1
sphinx_markdown_tables==0.0.17
sphinx_rtd_theme
tensorflow-probability

0 comments on commit bad99f5

Please sign in to comment.