1

我正在尝试在 SGE 集群上运行 ray.tune 以优化 pytorch 中模型的超参数。该代码在我的笔记本电脑上运行良好(但内存不足 - 因此我要使用集群)但是在我的大学集群上运行时出现错误:

RuntimeError: Redis has started but no raylets have registered yet.

我的作业脚本如下所示(没有一些与请求集群资源相关的标题行):

redis_password="5241590000000000"
port="6379"

#store stdout from ray in variable
ray_output=$(ray start --head --port $port --redis-password=$redis_password)

#get line number of IP address
ip_line=$(printf '%q\n' $ray_output | grep -n "IP:" | cut -d : -f 1)
ip_line=$((ip_line+1))

#get the IP address
ip=$(printf '%q\n' $ray_output | sed -n $ip_line'p')
ray_address=$ip":"$port

#execute the python script, passing ray address
python synthetic_geno_nn_cls.py $trainfile $testfile $ray_address $redis_password

我的 python 代码使用以下内容初始化 ray:

#receive command line inputs
train_f = sys.argv[1]
test_f = sys.argv[2]
ray_address = sys.argv[3]
redis_password = sys.argv[4]

#initialise ray
ray.init(address=ray_address, _redis_password=redis_password)

我也试过这个没有指定地址/redis密码并使用address='auto',但这给出了同样的错误。

任何帮助将不胜感激,谢谢!

4

0 回答 0