-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Dev: rebase master #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev: rebase master #150
Conversation
* make sure the key type of Batch is string, and add unit tests * add is_empty() function and unit tests * enable cat of mixing dict and Batch, just like stack
* minor polish * improve and implement Batch.cat_ * bugfix for buffer.sample with field impt_weight * restore the usage of a.cat_(b) * fix 2 bugs in batch and add corresponding unittest * code fix for update * update is_empty to recognize empty over empty; bugfix for len * bugfix for update and add testcase * add testcase of update * fix docs * fix docs * fix docs [ci skip] * fix docs [ci skip] Co-authored-by: Trinkle23897 <463003665@qq.com>
…ml#130) * re-implement Batch.stack and add testcases * add doc for Batch.stack * reuse _create_values and refactor stack_ & cat_ * fix pep8 * fix docs * raise exception for stacking with partial keys and axis!=0 * minor fix * minor fix Co-authored-by: Trinkle23897 <463003665@qq.com>
* remove multibuf * reward_metric * make fileds with empty Batch rather than None after reset * many fixes and refactor Co-authored-by: Trinkle23897 <463003665@qq.com>
* Enable selecting worker for vector env step method. * Update collector to match new vecenv selective worker behavior. * Bug fix. * Fix rebase Co-authored-by: Alexis Duburcq <alexis.duburcq@wandercraft.eu>
* code refactor; remove unused kwargs; add reward_normalization for dqn * bugfix for __setitem__ with torch.Tensor; add Batch.condense * minor fix * support cat with empty Batch * remove the dependency of is_empty on len; specify the semantic of empty Batch by test cases * support stack with empty Batch * remove condense * refactor code to reflect the shared / partial / reserved categories of keys * add is_empty(recursive=False) * doc fix * docfix and bugfix for _is_batch_set * add doc for key reservation * bugfix for algebra operators * fix cat with lens hint * code refactor * bugfix for storing None * use ValueError instead of exception * hide lens away from users * add comment for __cat * move the computation of the initial value of lens in cat_ itself. * change the place of doc string * doc fix for Batch doc string * change recursive to recurse * doc string fix * minor fix for batch doc
* add doc for len exceptions * doc move; unify is_scalar_value function * remove some issubclass check * bugfix for shape of Batch(a=1) * keep moving doc * keep writing batch tutorial * draft version of Batch tutorial done * improving doc * keep improving doc * batch tutorial done * rename _is_number * rename _is_scalar * shape property do not raise exception * restore some doc string * grammarly [ci skip] * grammarly + fix warning of building docs * polish docs * trim and re-arrange batch tutorial * go straight to the point * minor fix for batch doc * add shape / len in basic usage * keep improving tutorial * unify _to_array_with_correct_type to remove duplicate code * delegate type convertion to Batch.__init__ * further delegate type convertion to Batch.__init__ * bugfix for setattr * add a _parse_value function * remove dummy function call * polish docs Co-authored-by: Trinkle23897 <463003665@qq.com>
* Enable selecting worker for vector env step method. * Update collector to match new vecenv selective worker behavior. * Bug fix. * Fix rebase Co-authored-by: Alexis Duburcq <alexis.duburcq@wandercraft.eu>
* code refactor; remove unused kwargs; add reward_normalization for dqn * bugfix for __setitem__ with torch.Tensor; add Batch.condense * minor fix * support cat with empty Batch * remove the dependency of is_empty on len; specify the semantic of empty Batch by test cases * support stack with empty Batch * remove condense * refactor code to reflect the shared / partial / reserved categories of keys * add is_empty(recursive=False) * doc fix * docfix and bugfix for _is_batch_set * add doc for key reservation * bugfix for algebra operators * fix cat with lens hint * code refactor * bugfix for storing None * use ValueError instead of exception * hide lens away from users * add comment for __cat * move the computation of the initial value of lens in cat_ itself. * change the place of doc string * doc fix for Batch doc string * change recursive to recurse * doc string fix * minor fix for batch doc
* add doc for len exceptions * doc move; unify is_scalar_value function * remove some issubclass check * bugfix for shape of Batch(a=1) * keep moving doc * keep writing batch tutorial * draft version of Batch tutorial done * improving doc * keep improving doc * batch tutorial done * rename _is_number * rename _is_scalar * shape property do not raise exception * restore some doc string * grammarly [ci skip] * grammarly + fix warning of building docs * polish docs * trim and re-arrange batch tutorial * go straight to the point * minor fix for batch doc * add shape / len in basic usage * keep improving tutorial * unify _to_array_with_correct_type to remove duplicate code * delegate type convertion to Batch.__init__ * further delegate type convertion to Batch.__init__ * bugfix for setattr * add a _parse_value function * remove dummy function call * polish docs Co-authored-by: Trinkle23897 <463003665@qq.com>
I have no idea how to solve the conflict. Since in #133 I use "rebase and merge", and GitHub uses its customized "rebase" command and changes the commit hash. I tried #148 and Kaichao tried #149 and this commit but we are not satisfied with the result. I think there are two ways to solve it:
Maybe there is a third and better way? And is it a must for the current |
I tried in my local environment. Many conflicts.
I vote for this. Since dev is our main branch and master is only used for release, it seems we can reset the head of master to the head of dev to avoid these annoying issues. |
I would rather avoid forcing |
I’m lost.
The last release is v0.2.4.post1, and is the head of master now. So We can do this on dev, but I think what @Trinkle23897 concerns is that this forced push in dev will make pull requests like #122 have many conflicts. |
Absolutely not. |
And here you go ! Pretty easy, isn't it ? The, force push the new |
I don't like the way to treat master as a release-only branch. I found few repo do like this. The separation of master and dev has caused some extra problems for us in my opinion. So I'm here discussing this issue. |
I'll try it but I don't know whether this will cause some extra conflicts with current unmerged PRs. |
Same here.
I don't think so. We just need to get use of it. It is pretty easy to manage if done carefully. |
No it should not. And if it is, it can always be fixed with a simple |
I tested and except for #143, other PRs have conflict. But I think these are no big deal too. |
I'm done with the rebase on my PRs. |
I still want to discuss this thing:
I think the first issue is that we cannot perform a documentation fix or a bug fix in time by using the dev branch. If we merge the unstable PR into master instead of dev, users can checkout the tag like "0.2.4.post1" in git and readthedocs for both for the stable version. |
I withdraw what I have said above. Current test_drqn fails on cuda device, and if it appears in the master, some users may get annoyed. This is more important. |
And anyway, it is impossible to rely only on unit tests to make sure everything is working properly. Having new features available on dev branch first during a few weeks is a good way to ensure that everything gets heavily tested before releasing them on master. Patching master must be avoided at all cost for credible projects. |
I think my issue can be solved at https://tianshou.readthedocs.io/en/dev/ |
Awesome ! For me it is the way to go without any doubt. |
Less important but also useful: