GithubHelp home page GithubHelp logo

mushroomrl / mushroom-rl-benchmark Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 4.0 158.36 MB

Benchmarking suite for MushroomRL Deep RL algorithms

License: MIT License

Python 65.36% Shell 34.64%
benchmark-framework benchmarking deep-reinforcement-learning reinforcement-learning

mushroom-rl-benchmark's People

Contributors

benvoe avatar boris-il-forte avatar carloderamo avatar jacarvalho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mushroom-rl-benchmark's Issues

TypeError: Gym.__init__() missing 1 required positional argument: 'name'

I have this error

Traceback (most recent call last):
  File "/home/davide/code/ML/RL/bench.py", line 37, in <module>
    exp.run(
  File "/home/davide/code/mushroom-rl-benchmark/mushroom_rl_benchmark/core/experiment.py", line 63, in run
    run_fn(**executor_params, **run_params)
  File "/home/davide/code/mushroom-rl-benchmark/mushroom_rl_benchmark/core/experiment.py", line 157, in run_parallel
    runs = parallel(
  File "/home/davide/code/mushroom-rl-benchmark/mushroom_rl_benchmark/utils/tqdm_parallel.py", line 9, in __call__
    return joblib.Parallel.__call__(self, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/joblib/parallel.py", line 1098, in __call__
    self.retrieve()
  File "/usr/local/lib/python3.10/dist-packages/joblib/parallel.py", line 975, in retrieve
    self._output.extend(job.get(timeout=self.timeout))
  File "/usr/local/lib/python3.10/dist-packages/joblib/_parallel_backends.py", line 567, in wrap_future_result
    return future.result(timeout=timeout)
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
TypeError: Gym.__init__() missing 1 required positional argument: 'name'

With this code:

import time
from mushroom_rl_benchmark.core import BenchmarkExperiment, BenchmarkLogger
from mushroom_rl_benchmark.builders import EnvironmentBuilder, PPOBuilder

if __name__ == '__main__':

    logger = BenchmarkLogger(
        log_dir='./logs',
        log_id='ppo_pendulum'
    )

    agent_builder = PPOBuilder.default(
        actor_lr=3e-4,
        critic_lr=3e-4,
        n_features=32
    )

    env_name = 'Gym'
    env_params = dict(
        env_id='Pendulum-v0',
        horizon=200,
        gamma=.99
    )

    parallel = dict(
            max_concurrent_runs=10
    )

    env_builder = EnvironmentBuilder(env_name, env_params)
    logger.info('Environment is imported')

    exp = BenchmarkExperiment(agent_builder, env_builder, logger)
    logger.info('BenchmarkExperiment was built successfully')

    start_time = time.time()
    exp.run(
        exec_type='parallel',
        n_runs=10,
        n_epochs=100,
        n_steps=30000,
        n_episodes_test=5,
        parallel=parallel
    )
    end_time = time.time()
    logger.info('Execution time: {} SEC'.format(end_time-start_time))

    exp.save_plot()

Is there a list of benchmarks provided?

Hi, thanks, this is great. Is there a list of benchmarks provided? Or figures of their performance?

I'm looking to do a full sweep on Atari, MujoCo, and DM-Control. Would the hyperparameters provided here be suitable for all of those? If not, which ones?

errors in benchmark

I'm trying to run benchmark.py -e BreakoutDeterministic-v4 but I have errors:

Traceback (most recent call last):
  File "/home/davide/code/mushroom-rl-benchmark/benchmark.py", line 9, in <module>
    from mushroom_rl_benchmark import BenchmarkSuite
ImportError: cannot import name 'BenchmarkSuite' from 'mushroom_rl_benchmark' (/home/davide/code/mushroom-rl-benchmark/mushroom_rl_benchmark/__init__.py)

I managed to fix this changing the import to
from mushroom_rl_benchmark.core.suite import BenchmarkSuite
but now I have another error:

Traceback (most recent call last):
  File "/home/davide/code/mushroom-rl-benchmark/benchmark.py", line 9, in <module>
    from mushroom_rl_benchmark.core.suite import BenchmarkSuite
  File "/home/davide/code/mushroom-rl-benchmark/mushroom_rl_benchmark/core/__init__.py", line 1, in <module>
    from .experiment import BenchmarkExperiment
  File "/home/davide/code/mushroom-rl-benchmark/mushroom_rl_benchmark/core/experiment.py", line 12, in <module>
    from mushroom_rl_benchmark.experiment import exec_run
  File "/home/davide/code/mushroom-rl-benchmark/mushroom_rl_benchmark/experiment/__init__.py", line 1, in <module>
    from .run import exec_run
  File "/home/davide/code/mushroom-rl-benchmark/mushroom_rl_benchmark/experiment/run.py", line 7, in <module>
    from mushroom_rl.utils.dataset import compute_J, parse_dataset, get_init_states
ImportError: cannot import name 'get_init_states' from 'mushroom_rl.utils.dataset' (/home/davide/.local/lib/python3.10/site-packages/mushroom_rl/utils/dataset.py)

get_init_states is not defined anywhere

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.