这是indexloc提供的服务,不要输入任何密码
Skip to content

fix numpy>=1.20 typing check #323

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

Merged
merged 14 commits into from
Mar 30, 2021
Merged

Conversation

Trinkle23897
Copy link
Collaborator

@Trinkle23897 Trinkle23897 commented Mar 25, 2021

Change the behavior of to_numpy and to_torch: from now on, dict is automatically converted to Batch and list is automatically converted to np.ndarray (if an error occurs, raise the exception instead of converting each element in the list).

@Trinkle23897 Trinkle23897 marked this pull request as draft March 25, 2021 02:46
@Trinkle23897 Trinkle23897 linked an issue Mar 25, 2021 that may be closed by this pull request
@Trinkle23897 Trinkle23897 self-assigned this Mar 25, 2021
@codecov-io
Copy link

codecov-io commented Mar 25, 2021

Codecov Report

Merging #323 (a25fac3) into master (105b277) will decrease coverage by 0.04%.
The diff coverage is 96.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #323      +/-   ##
==========================================
- Coverage   93.95%   93.91%   -0.05%     
==========================================
  Files          51       51              
  Lines        3275     3253      -22     
==========================================
- Hits         3077     3055      -22     
  Misses        198      198              
Flag Coverage Δ
unittests 93.91% <96.77%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tianshou/utils/log_tools.py 93.22% <ø> (ø)
tianshou/env/venvs.py 91.30% <75.00%> (+0.59%) ⬆️
tianshou/data/buffer/prio.py 90.47% <77.77%> (-4.27%) ⬇️
tianshou/data/buffer/base.py 99.41% <93.75%> (+0.57%) ⬆️
tianshou/data/batch.py 99.74% <100.00%> (-0.01%) ⬇️
tianshou/data/buffer/cached.py 100.00% <100.00%> (ø)
tianshou/data/buffer/manager.py 83.70% <100.00%> (ø)
tianshou/data/collector.py 94.93% <100.00%> (ø)
tianshou/data/utils/converter.py 100.00% <100.00%> (ø)
tianshou/env/worker/subproc.py 91.27% <100.00%> (ø)
... and 13 more

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 105b277...a25fac3. Read the comment docs.

@Trinkle23897 Trinkle23897 marked this pull request as ready for review March 26, 2021 04:30
@Trinkle23897 Trinkle23897 requested a review from duburcqa March 26, 2021 04:30
ChenDRAG
ChenDRAG previously approved these changes Mar 30, 2021
@Trinkle23897 Trinkle23897 merged commit 09692c8 into thu-ml:master Mar 30, 2021
@Trinkle23897 Trinkle23897 deleted the np-1.20 branch March 30, 2021 08:06
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
Change the behavior of to_numpy and to_torch: from now on, dict is automatically converted to Batch and list is automatically converted to np.ndarray (if an error occurs, raise the exception instead of converting each element in the list).
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.

Stricter requirement for Numpy
3 participants