Redis failed to start while running a program with Python Ray Library - RuntimeError: Couldn't start Redis

987 views Asked by At

I am trying to use ray[tune] on a linux server where I am just a user without the root permission.

After installing ray[tune] and running python code from ray import tune , I got an error message:

ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found

Followed the instructions online, I changed the environment variables:

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

Then I was able to run the python code from ray import tune.

But when I ran the below code in link

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, alpha, 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

I got error: RuntimeError: Couldn't start Redis

logs/redis.err says:

thirdparty/redis/src/redis-server: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument

*Ray version is 1.0.0, Python version is 3.8.6

Any fix/reason for this failure?

0

There are 0 answers