Skip to content

Conversation

@AdamGleave
Copy link
Member

Fixes #219

May introduce a slight performance overhead -- I've not tested. @shwang thought PyTorch was soft-copying anyway. I expect this to be insignificant for current workloads, we can do something smarter if/when profiling reveals this is an issue.

@AdamGleave AdamGleave requested review from qxcv and shwang September 1, 2021 03:14
@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #332 (a404f28) into master (57f5b88) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #332   +/-   ##
=======================================
  Coverage   89.88%   89.88%           
=======================================
  Files          79       79           
  Lines        5802     5805    +3     
=======================================
+ Hits         5215     5218    +3     
  Misses        587      587           
Impacted Files Coverage Δ
src/imitation/data/types.py 100.00% <ø> (ø)
tests/test_scripts.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57f5b88...a404f28. Read the comment docs.

@AdamGleave
Copy link
Member Author

@qxcv will you have time to review? If not I'll ask someone else to take a look.

@qxcv
Copy link
Member

qxcv commented Sep 6, 2021

Yep, can review!

Copy link
Member

@qxcv qxcv left a comment

Choose a reason for hiding this comment

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

Looks good to me. I'm not too worried about perf impact. It it's a bottleneck (e.g. for image envs with huge observations) then it should be pretty obvious from profiling later on, since it's just one function call.

@AdamGleave AdamGleave merged commit 274d6df into master Sep 6, 2021
@AdamGleave AdamGleave deleted the pytorch-mutable-warning branch September 6, 2021 20:46
@taufeeque9 taufeeque9 mentioned this pull request Dec 19, 2023
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.

PyTorch complains when we pass in Transitions because arrays are nonwritable

3 participants