9 Star 14 Fork 3

Gitee 极速下载/Horovod

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/uber/horovod
克隆/下载
assert-package-versions.sh 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
set -euo pipefail
result=0
for var in TENSORFLOW_PACKAGE KERAS_PACKAGE PYTORCH_PACKAGE PYTORCH_LIGHTNING_PACKAGE TORCHVISION_PACKAGE MXNET_PACKAGE PYSPARK_PACKAGE
do
if [ -z "${!var-}" ]
then
echo -e "$var \u001b[31mnot set\u001b[0m"
result=1
continue
fi
pattern="${!var}"
if [ "$pattern" == "None" ]
then
continue
elif [[ "$pattern" == "tf-nightly" ]]
then
flag="-P"
pattern="$pattern==.*\\.dev20\\d{6}"
elif [[ "$pattern" == "torch-nightly"* ]] ||
[[ "$pattern" == "torchvision" ]]
then
flag="-P"
pattern="${pattern/-nightly*/}==.*\\.dev20\\d{6}.*"
elif [[ "$pattern" == "mxnet-nightly"* ]]
then
flag="-P"
pattern="${pattern/-nightly/}==.*20\\d{6}"
else
flag="-Fx"
fi
found=$(pip freeze | grep -i $flag "$pattern" || true)
if [ -n "$found" ]
then
if [ "$found" == "$pattern" ]
then
echo -e "$found \u001b[32mfound\u001b[0m"
else
echo -e "$found \u001b[32mfound\u001b[0m (matches ${!var} / $pattern)"
fi
else
found=$(pip freeze | grep -i "^${pattern/=*/==}" || true)
if [ -n "$found" ]
then
echo -e "$found \u001b[31mfound BUT\u001b[0m ${!var} / $pattern \u001b[31mexpected\u001b[0m"
else
echo -e "$pattern \u001b[31mNOT found\u001b[0m (no match for ${!var} / $pattern)"
fi
result=1
fi
done
exit $result
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/Horovod.git
git@gitee.com:mirrors/Horovod.git
mirrors
Horovod
Horovod
master

搜索帮助