Skip to content

Add vector env support#266

Merged
Jinyu-W merged 21 commits into
microsoft:v0.2from
chaosddp:v0.2.vector_env
Feb 1, 2021
Merged

Add vector env support#266
Jinyu-W merged 21 commits into
microsoft:v0.2from
chaosddp:v0.2.vector_env

Conversation

@chaosddp
Copy link
Copy Markdown
Contributor

@chaosddp chaosddp commented Jan 28, 2021

Description

Add a simple multiple-process based vector environments class (via command with Pipe), to support start multiple environments to train.

Linked issue(s)/Pull request(s)

Type of Change

  • Non-breaking bug fix
  • Breaking bug fix
  • New feature
  • Test
  • Doc update
  • Docker update

Related Component

  • Simulation toolkit
  • RL toolkit
  • Distributed toolkit

Has Been Tested

  • OS:
    • Windows
    • Mac OS
    • Linux
  • Python version:
    • 3.6
    • 3.7
  • Key information snapshot(s):

Needs Follow Up Actions

  • New release package
  • New docker image

Checklist

  • Add/update the related comments
  • Add/update the related tests
  • Add/update the related documentations
  • Update the dependent downstream modules usage

@chaosddp chaosddp added the awaiting review Wait for the reviewer's comments. label Jan 28, 2021
@chaosddp chaosddp requested review from Jinyu-W and removed request for Jinyu-W January 28, 2021 03:13
@chaosddp chaosddp added in progress Not finished items/bugs. and removed awaiting review Wait for the reviewer's comments. labels Jan 28, 2021
@chaosddp chaosddp changed the title V0.2.vector env Add vector env support Jan 28, 2021
@chaosddp chaosddp added awaiting review Wait for the reviewer's comments. and removed in progress Not finished items/bugs. labels Jan 29, 2021
@chaosddp chaosddp requested a review from Jinyu-W January 29, 2021 02:34
@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 1, 2021

Codecov Report

Merging #266 (a97a005) into v0.2 (17261e3) will increase coverage by 0.13%.
The diff coverage is 68.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             v0.2     #266      +/-   ##
==========================================
+ Coverage   64.01%   64.15%   +0.13%     
==========================================
  Files         114      116       +2     
  Lines        5605     5755     +150     
==========================================
+ Hits         3588     3692     +104     
- Misses       2017     2063      +46     
Flag Coverage Δ
unittests 64.15% <68.66%> (+0.13%) ⬆️

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

Impacted Files Coverage Δ
maro/simulator/scenarios/citi_bike/common.py 64.81% <16.66%> (-6.02%) ⬇️
maro/vector_env/env_process.py 26.82% <26.82%> (ø)
maro/vector_env/vector_env.py 87.62% <87.62%> (ø)
maro/simulator/scenarios/cim/common.py 67.85% <100.00%> (+3.85%) ⬆️
maro/simulator/scenarios/helpers.py 73.33% <0.00%> (+3.33%) ⬆️

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 17261e3...a97a005. Read the comment docs.

Comment thread examples/vector_env/hello.py
Comment thread examples/vector_env/hello.py
Comment thread examples/vector_env/hello.py
Comment thread maro/simulator/scenarios/cim/common.py
Comment thread maro/vector_env/__init__.py
Comment thread maro/vector_env/vector_env.py Outdated
Comment thread maro/vector_env/vector_env.py Outdated
Comment thread maro/vector_env/vector_env.py Outdated
Comment thread maro/simulator/scenarios/cim/business_engine.py Outdated
# Update cost.
num = abs(move_num)
if action_type == ActionType.DISCHARGE:
assert(move_num <= vessel_empty)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also need to check the port capacity?

I remember we have this attribute but just with a big enough value?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Arthur and Ruidong removed this checking long long ago, I am not sure why, so sometime we can see that the empty+full may greater than capacity in cim vis page.

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

Labels

awaiting review Wait for the reviewer's comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants