From f3d7c95b24b9487422e88c675c678e2fa8df11d5 Mon Sep 17 00:00:00 2001 From: Florian Felten Date: Tue, 16 Jul 2024 13:49:47 +0200 Subject: [PATCH] Fix PGMORL example (#104) * Fix PGMORL example * Numpy 2 breaks pymoo --- examples/pgmorl_halfcheetah.py | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/pgmorl_halfcheetah.py b/examples/pgmorl_halfcheetah.py index 6f2b54da..5b54ed5b 100644 --- a/examples/pgmorl_halfcheetah.py +++ b/examples/pgmorl_halfcheetah.py @@ -18,6 +18,7 @@ ) algo.train( total_timesteps=int(5e6), + eval_env=make_env(env_id, 42, 0, "PGMORL_eval_env", gamma=0.995)(), ref_point=np.array([0.0, -5.0]), known_pareto_front=None, ) diff --git a/pyproject.toml b/pyproject.toml index f6e7c7a0..362d1037 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ dependencies = [ "mo-gymnasium >=1.0.1", "gymnasium>=0.28.1,<0.30", - "numpy >=1.21.0", + "numpy >=1.21.0,<2.0.0", "torch >=1.12.0", "pygame >=2.1.0", "scipy >=1.7.3",