[WIP] Adding MultiAgent Utilities#323
Conversation
|
This pull request introduces 1 alert when merging 0927001 into c3ef4d9 - view on LGTM.com new alerts:
|
|
Looks pretty good. |
|
This pull request introduces 2 alerts when merging daa8b2a into c3ef4d9 - view on LGTM.com new alerts:
|
|
This pull request introduces 2 alerts when merging 44db72e into c3ef4d9 - view on LGTM.com new alerts:
|
|
This pull request introduces 2 alerts when merging d8cf1a9 into c3ef4d9 - view on LGTM.com new alerts:
|
|
This pull request introduces 5 alerts when merging 1365585 into c3ef4d9 - view on LGTM.com new alerts:
|
| self.env.close() | ||
|
|
||
|
|
||
| class MultiGymWrapper(gym.Wrapper): |
There was a problem hiding this comment.
Whats the difference between this and a normal Wrapper? Cant you use a TorchWrapper instead of creating this?
There was a problem hiding this comment.
This is just a template, I haven't added anything yet
Sharad24
left a comment
There was a problem hiding this comment.
Can you install pre-commit? You can see the instructions in Contributing.md
|
This pull request introduces 5 alerts when merging 6f0563e into c3ef4d9 - view on LGTM.com new alerts:
|
|
This pull request introduces 7 alerts when merging 5061abe into 0fe4180 - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #323 +/- ##
==========================================
- Coverage 90.77% 87.31% -3.47%
==========================================
Files 89 89
Lines 3772 4027 +255
==========================================
+ Hits 3424 3516 +92
- Misses 348 511 +163
|
|
|
||
| - repo: https://github.com/timothycrosley/isort | ||
| rev: 4.3.2 | ||
| rev: 5.5.0 |
There was a problem hiding this comment.
Its very risky to change the versions here because of compatibility. Can you revert these?
There was a problem hiding this comment.
When I change that I get some errors. Any other way to rectify it?
There was a problem hiding this comment.
Have you changed the isort.cfg file?
| class Critic(MlpValue): | ||
| def __init__( | ||
| self, | ||
| state_dim: spaces.Space, | ||
| action_dim: spaces.Space, | ||
| fc_layers: Tuple = (32, 32), | ||
| val_type: str = "V", | ||
| **kwargs, | ||
| ): | ||
| super(Critic, self).__init__( | ||
| state_dim, action_dim, fc_layers, val_type, **kwargs | ||
| ) | ||
|
|
||
| self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | ||
|
|
||
| def forward(self, state): | ||
|
|
||
| state = self.model(state) | ||
|
|
||
| return state | ||
|
|
||
| def get_value(self, state): | ||
| # state = torch.FloatTensor(state).to(self.device) | ||
| value = self.forward(state) | ||
| return value |
There was a problem hiding this comment.
Whats different in this Critic? You could just use the MlpValue directly?
There was a problem hiding this comment.
I'll add in the changes on the fly. I am just creating a template so that it can be used readily
…enrl into multiagentutils
Co-authored-by: Vedant Shah <vedantshah2012@gmail.com>
Co-authored-by: Vedant Shah <vedantshah2012@gmail.com>
Co-authored-by: Vedant Shah <vedantshah2012@gmail.com>
Co-authored-by: Vedant Shah <vedantshah2012@gmail.com>
Co-authored-by: Vedant Shah <vedantshah2012@gmail.com>
Co-authored-by: Vedant Shah <vedantshah2012@gmail.com>
No description provided.