GithubHelp home page GithubHelp logo

martkartasev / btbackchainingrl Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 1.0 824 KB

An experimentation environment based on malmö, stable-baselines and py-trees

Python 100.00%
pytorch reinforcement-learning

btbackchainingrl's People

Contributors

leptonquark avatar martkartasev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

wangtong2015

btbackchainingrl's Issues

Suggest to loosen the dependency on stable-baselines3

Hi, your project BTBackchainingRL requires "stable-baselines3==1.1.0" in its dependency. After analyzing the source code, we found that the following versions of stable-baselines3 can also be suitable without affecting your project, i.e., stable-baselines3 1.1.0a11. Therefore, we suggest to loosen the dependency on stable-baselines3 from "stable-baselines3==1.1.0" to "stable-baselines3>=1.1.0a11,<=1.1.0" to avoid any possible conflict for importing more packages or for downstream projects that may use BTBackchainingRL.

May I pull a request to further loosen the dependency on stable-baselines3?

By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?



We also give our detailed analysis as follows for your reference:

Your project BTBackchainingRL directly uses 7 APIs from package stable-baselines3.

stable_baselines3.common.env_checker.check_env, stable_baselines3.common.monitor.load_results, stable_baselines3.ppo.ppo.PPO.__init__, stable_baselines3.common.callbacks.BaseCallback.__init__, stable_baselines3.common.results_plotter.ts2xy, stable_baselines3.common.base_class.BaseAlgorithm.load, stable_baselines3.common.monitor.Monitor.__init__

Beginning from the 7 APIs above, 84 functions are then indirectly called, including -7 stable-baselines3's internal APIs and 91 outsider APIs. The specific call graph is listed as follows (neglecting some repeated function occurrences).

[/martkartasev/BTBackchainingRL]
+--stable_baselines3.common.env_checker.check_env
|      +--stable_baselines3.common.env_checker._check_spaces
|      +--stable_baselines3.common.env_checker._check_unsupported_spaces
|      |      +--warnings.warn
|      |      +--stable_baselines3.common.env_checker._is_numpy_array_space
|      +--warnings.warn
|      +--stable_baselines3.common.env_checker._check_box_obs
|      |      +--stable_baselines3.common.env_checker._check_image_input
|      |      |      +--warnings.warn
|      |      |      +--numpy.any
|      |      |      +--stable_baselines3.common.preprocessing.is_image_space_channels_first
|      |      |      |      +--numpy.argmin
|      |      |      |      +--warnings.warn
|      |      +--warnings.warn
|      +--numpy.any
|      +--numpy.abs
|      +--stable_baselines3.common.env_checker._check_returned_values
|      |      +--stable_baselines3.common.env_checker._check_obs
|      |      |      +--stable_baselines3.common.env_checker._is_numpy_array_space
|      +--stable_baselines3.common.env_checker._check_render
|      |      +--warnings.warn
|      +--stable_baselines3.common.env_checker._is_numpy_array_space
|      +--stable_baselines3.common.env_checker._check_nan
|      |      +--stable_baselines3.common.vec_env.vec_check_nan.VecCheckNan.__init__
|      |      |      +--stable_baselines3.common.vec_env.base_vec_env.VecEnvWrapper.__init__
|      |      |      |      +--stable_baselines3.common.vec_env.base_vec_env.VecEnv.__init__
|      |      |      |      +--inspect.getmembers
|      |      +--stable_baselines3.common.vec_env.dummy_vec_env.DummyVecEnv.__init__
|      |      |      +--stable_baselines3.common.vec_env.base_vec_env.VecEnv.__init__
|      |      |      +--stable_baselines3.common.vec_env.util.obs_space_info
|      |      |      |      +--stable_baselines3.common.preprocessing.check_for_nested_spaces
|      |      |      +--collections.OrderedDict
|      |      |      +--numpy.zeros
|      |      +--numpy.array
|      |      +--stable_baselines3.common.vec_env.base_vec_env.VecEnv.step
|      |      |      +--stable_baselines3.common.vec_env.base_vec_env.VecEnv.step_async
|      |      |      +--stable_baselines3.common.vec_env.base_vec_env.VecEnv.step_wait
+--stable_baselines3.common.monitor.load_results
|      +--stable_baselines3.common.monitor.get_monitor_files
|      |      +--glob.glob
|      |      +--os.path.join
|      +--stable_baselines3.common.monitor.LoadMonitorResultsError.__init__
|      +--json.loads
|      +--pandas.read_csv
|      +--pandas.concat
+--stable_baselines3.ppo.ppo.PPO.__init__
|      +--stable_baselines3.common.on_policy_algorithm.OnPolicyAlgorithm.__init__
|      |      +--stable_baselines3.common.base_class.BaseAlgorithm.__init__
|      |      |      +--stable_baselines3.common.policies.get_policy_from_name
|      |      |      +--stable_baselines3.common.utils.get_device
|      |      |      |      +--torch.device
|      |      |      |      +--torch.cuda.is_available
|      |      |      +--stable_baselines3.common.vec_env.unwrap_vec_normalize
|      |      |      |      +--stable_baselines3.common.vec_env.unwrap_vec_wrapper
|      |      |      +--stable_baselines3.common.base_class.maybe_make_env
|      |      |      |      +--gym.make
|      |      |      +--stable_baselines3.common.base_class.BaseAlgorithm._wrap_env
|      |      |      |      +--stable_baselines3.common.vec_env.dummy_vec_env.DummyVecEnv.__init__
|      |      |      |      +--stable_baselines3.common.monitor.Monitor.__init__
|      |      |      |      |      +--time.time
|      |      |      |      |      +--stable_baselines3.common.monitor.ResultsWriter.__init__
|      |      |      |      |      |      +--os.path.isdir
|      |      |      |      |      |      +--os.path.join
|      |      |      |      |      |      +--json.dumps
|      |      |      |      |      |      +--csv.DictWriter
|      |      |      |      +--stable_baselines3.common.env_util.is_wrapped
|      |      |      |      |      +--stable_baselines3.common.env_util.unwrap_wrapper
|      |      |      |      +--stable_baselines3.common.preprocessing.check_for_nested_spaces
|      |      |      |      +--stable_baselines3.common.vec_env.is_vecenv_wrapped
|      |      |      |      |      +--stable_baselines3.common.vec_env.unwrap_vec_wrapper
|      |      |      |      +--stable_baselines3.common.vec_env.vec_transpose.VecTransposeImage.__init__
|      |      |      |      |      +--stable_baselines3.common.preprocessing.is_image_space
|      |      |      |      |      |      +--stable_baselines3.common.preprocessing.is_image_space_channels_first
|      |      |      |      |      |      +--numpy.any
|      |      |      |      |      +--copy.deepcopy
|      |      |      |      |      +--stable_baselines3.common.vec_env.vec_transpose.VecTransposeImage.transpose_space
|      |      |      |      |      |      +--stable_baselines3.common.preprocessing.is_image_space
|      |      |      |      |      |      +--stable_baselines3.common.preprocessing.is_image_space_channels_first
|      |      |      |      |      |      +--gym.spaces.Box
|      |      |      |      |      +--stable_baselines3.common.vec_env.base_vec_env.VecEnvWrapper.__init__
|      |      |      |      +--stable_baselines3.common.preprocessing.is_image_space
|      |      |      |      +--stable_baselines3.common.preprocessing.is_image_space_channels_first
|      |      +--stable_baselines3.common.on_policy_algorithm.OnPolicyAlgorithm._setup_model
|      |      |      +--stable_baselines3.common.base_class.BaseAlgorithm._setup_lr_schedule
|      |      |      |      +--stable_baselines3.common.utils.get_schedule_fn
|      |      |      |      |      +--stable_baselines3.common.utils.constant_fn
|      |      |      +--stable_baselines3.common.base_class.BaseAlgorithm.set_random_seed
|      |      |      |      +--stable_baselines3.common.utils.set_random_seed
|      |      |      |      |      +--random.seed
|      |      |      |      |      +--numpy.random.seed
|      |      |      |      |      +--torch.manual_seed
|      |      |      |      +--torch.device
|      +--warnings.warn
|      +--stable_baselines3.ppo.ppo.PPO._setup_model
|      |      +--stable_baselines3.common.on_policy_algorithm.OnPolicyAlgorithm._setup_model
|      |      +--stable_baselines3.common.utils.get_schedule_fn
+--stable_baselines3.common.callbacks.BaseCallback.__init__
|      +--abc.ABC.__init__
+--stable_baselines3.common.results_plotter.ts2xy
|      +--numpy.cumsum
|      +--numpy.arange
+--stable_baselines3.common.base_class.BaseAlgorithm.load
|      +--stable_baselines3.common.save_util.load_from_zip_file
|      |      +--stable_baselines3.common.save_util.open_path
|      |      +--stable_baselines3.common.utils.get_device
|      |      +--zipfile.ZipFile
|      |      +--stable_baselines3.common.save_util.json_to_data
|      |      |      +--json.loads
|      |      |      +--base64.b64decode
|      |      |      +--cloudpickle.loads
|      |      |      +--warnings.warn
|      |      +--io.BytesIO
|      |      +--torch.load
|      |      +--os.path.splitext
|      +--stable_baselines3.common.utils.check_for_correct_spaces
|      +--stable_baselines3.common.save_util.recursive_setattr
|      |      +--stable_baselines3.common.save_util.recursive_getattr
|      |      |      +--functools.reduce
+--stable_baselines3.common.monitor.Monitor.__init__

We scan stable-baselines3's versions and observe that during its evolution between any version from [1.1.0a11] and 1.1.0, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).

diff: 1.1.0(original) 1.1.0a11
['stable-baselines3.common.callbacks.EvalCallback', 'stable-baselines3.common.callbacks.EvalCallback._on_step', 'stable-baselines3.common.buffers.DictReplayBuffer']

As for other packages, the APIs of warnings, numpy, json, pandas, abc, time, glob, os, zipfile, io, torch, csv, collections, base64, cloudpickle, functools, inspect, gym, copy and random are called by stable-baselines3 in the call graph and the dependencies on these packages also stay the same in our suggested versions, thus avoiding any outside conflict.

Therefore, we believe that it is quite safe to loose your dependency on stable-baselines3 from "stable-baselines3==1.1.0" to "stable-baselines3>=1.1.0a11,<=1.1.0". This will improve the applicability of BTBackchainingRL and reduce the possibility of any further dependency conflict with other projects.

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.