问题描述
我试图在Linux服务器上使用ray [tune],在该服务器上我只是未经root许可的用户。
在安装ray [tune]并运行python代码from ray import tune
之后,我收到一条错误消息:
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found
按照在线说明操作,我更改了环境变量:
LD_LIBRARY_PATH=/home/USERNAME/dependency/glibc-2.17/lib/:/lib64/:/usr/local/gcc-5.3.0/lib64/
/home/USERNAME/dependency/glibc-2.17/lib/ld-2.17.so /home/USERNAME/python3.8.6/bin/python
然后,我能够运行python代码from ray import tune
。
from ray import tune
def objective(step,alpha,beta):
return (0.1 + alpha * step / 100)**(-1) + beta * 0.1
def training_function(config):
# Hyperparameters
alpha,beta = config["alpha"],config["beta"]
for step in range(10):
# Iterative training function - can be any arbitrary training procedure.
intermediate_score = objective(step,beta)
# Feed the score back back to Tune.
tune.report(mean_loss=intermediate_score)
analysis = tune.run(
training_function,config={
"alpha": tune.grid_search([0.001,0.01,0.1]),"beta": tune.choice([1,2,3])
})
print("Best config: ",analysis.get_best_config(
metric="mean_loss",mode="min"))
# Get a dataframe for analyzing trial results.
df = analysis.results_df
我收到错误消息:RuntimeError: Couldn't start Redis
logs / redis.err说:
thirdparty / redis / src / redis-server:加载共享库时出错:__vdso_time:dlopen()的无效模式:无效的参数
* Ray版本是1.0.0,Python版本是3.8.6
对此失败有任何解决方案/原因吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)