Skip to content

Conversation

@AdityaKapoor74
Copy link
Contributor

No description provided.

@lgtm-com
Copy link

lgtm-com bot commented Sep 3, 2020

This pull request introduces 1 alert when merging 0927001 into c3ef4d9 - view on LGTM.com

new alerts:

  • 1 for Variable defined multiple times

@Sharad24
Copy link
Member

Sharad24 commented Sep 3, 2020

Looks pretty good.

@lgtm-com
Copy link

lgtm-com bot commented Sep 3, 2020

This pull request introduces 2 alerts when merging daa8b2a into c3ef4d9 - view on LGTM.com

new alerts:

  • 1 for Syntax error
  • 1 for Variable defined multiple times

@lgtm-com
Copy link

lgtm-com bot commented Sep 3, 2020

This pull request introduces 2 alerts when merging 44db72e into c3ef4d9 - view on LGTM.com

new alerts:

  • 1 for Syntax error
  • 1 for Variable defined multiple times

@lgtm-com
Copy link

lgtm-com bot commented Sep 3, 2020

This pull request introduces 2 alerts when merging d8cf1a9 into c3ef4d9 - view on LGTM.com

new alerts:

  • 1 for Syntax error
  • 1 for Variable defined multiple times

@lgtm-com
Copy link

lgtm-com bot commented Sep 3, 2020

This pull request introduces 5 alerts when merging 1365585 into c3ef4d9 - view on LGTM.com

new alerts:

  • 2 for Syntax error
  • 2 for First argument to super() is not enclosing class
  • 1 for Variable defined multiple times

self.env.close()


class MultiGymWrapper(gym.Wrapper):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the difference between this and a normal Wrapper? Cant you use a TorchWrapper instead of creating this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a template, I haven't added anything yet

Copy link
Member

@Sharad24 Sharad24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you install pre-commit? You can see the instructions in Contributing.md

@lgtm-com
Copy link

lgtm-com bot commented Sep 3, 2020

This pull request introduces 5 alerts when merging 6f0563e into c3ef4d9 - view on LGTM.com

new alerts:

  • 2 for Syntax error
  • 2 for First argument to super() is not enclosing class
  • 1 for Variable defined multiple times

@lgtm-com
Copy link

lgtm-com bot commented Sep 4, 2020

This pull request introduces 7 alerts when merging 5061abe into 0fe4180 - view on LGTM.com

new alerts:

  • 2 for Mismatch between signature and use of an overriding method
  • 2 for Wrong number of arguments in a class instantiation
  • 1 for First argument to super() is not enclosing class
  • 1 for Variable defined multiple times
  • 1 for Wrong number of arguments in a call

@codecov
Copy link

codecov bot commented Sep 4, 2020

Codecov Report

Merging #323 into master will decrease coverage by 3.46%.
The diff coverage is 36.07%.

@@            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     
Impacted Files Coverage Δ
genrl/agents/deep/a2c/a2c.py 93.58% <ø> (ø)
genrl/agents/deep/ddpg/ddpg.py 83.05% <0.00%> (-4.45%) ⬇️
genrl/core/rollout_storage.py 56.04% <9.21%> (-33.58%) ⬇️
genrl/environments/suite.py 73.68% <11.11%> (-19.42%) ⬇️
genrl/core/buffers.py 63.72% <12.82%> (-31.52%) ⬇️
genrl/environments/gym_wrapper.py 54.21% <27.50%> (-24.86%) ⬇️
genrl/agents/deep/ppo1/ppo1.py 97.61% <33.33%> (-2.39%) ⬇️
genrl/utils/utils.py 86.62% <78.82%> (-7.63%) ⬇️


- repo: https://github.com/timothycrosley/isort
rev: 4.3.2
rev: 5.5.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its very risky to change the versions here because of compatibility. Can you revert these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I change that I get some errors. Any other way to rectify it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you changed the isort.cfg file?

Comment on lines 301 to 325
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats different in this Critic? You could just use the MlpValue directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add in the changes on the fly. I am just creating a template so that it can be used readily

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants