Skip to content
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

Refine decision event logic #559

Merged
merged 9 commits into from
Aug 31, 2022
Merged

Refine decision event logic #559

merged 9 commits into from
Aug 31, 2022

Conversation

lihuoran
Copy link
Contributor

Description

  • Add DecisionEventPayload and ActionPayload as the base class for payloads of decision events & action events.
  • Add related type check during running.
  • Rename related variables under simulator/.
  • Refine the action handling logic. Modify Env and related BEs.

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.7
    • 3.8
    • 3.9
  • 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

@lihuoran lihuoran requested a review from Jinyu-W August 29, 2022 06:18
examples/cim/rl/env_sampler.py Outdated Show resolved Hide resolved
maro/simulator/core.py Show resolved Hide resolved
maro/simulator/core.py Show resolved Hide resolved
maro/simulator/scenarios/cim/business_engine.py Outdated Show resolved Hide resolved
maro/simulator/scenarios/citi_bike/business_engine.py Outdated Show resolved Hide resolved
maro/simulator/scenarios/citi_bike/business_engine.py Outdated Show resolved Hide resolved
tests/cim/test_cim_scenario.py Outdated Show resolved Hide resolved
maro/common.py Outdated Show resolved Hide resolved
maro/common.py Outdated Show resolved Hide resolved
maro/event_buffer/event_buffer.py Outdated Show resolved Hide resolved
maro/simulator/core.py Outdated Show resolved Hide resolved
maro/simulator/core.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 31, 2022

Codecov Report

Merging #559 (f96c4d2) into v0.3 (8022cd9) will increase coverage by 0.40%.
The diff coverage is 84.21%.

@@            Coverage Diff             @@
##             v0.3     #559      +/-   ##
==========================================
+ Coverage   78.90%   79.30%   +0.40%     
==========================================
  Files          85       86       +1     
  Lines        5455     5464       +9     
==========================================
+ Hits         4304     4333      +29     
+ Misses       1151     1131      -20     
Flag Coverage Δ
unittests 79.30% <84.21%> (+0.40%) ⬆️

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

Impacted Files Coverage Δ
...o/simulator/scenarios/citi_bike/business_engine.py 75.00% <42.85%> (ø)
maro/simulator/core.py 85.40% <68.75%> (-0.73%) ⬇️
...mulator/scenarios/vm_scheduling/business_engine.py 78.72% <90.00%> (+0.09%) ⬆️
maro/common.py 100.00% <100.00%> (ø)
maro/event_buffer/event_buffer.py 100.00% <100.00%> (ø)
maro/simulator/scenarios/cim/business_engine.py 93.63% <100.00%> (-0.02%) ⬇️
maro/simulator/scenarios/cim/common.py 96.49% <100.00%> (+1.84%) ⬆️
maro/simulator/scenarios/citi_bike/common.py 65.45% <100.00%> (+0.63%) ⬆️
maro/simulator/scenarios/vm_scheduling/common.py 82.60% <100.00%> (+0.38%) ⬆️
maro/simulator/utils/common.py 88.88% <100.00%> (-1.59%) ⬇️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Jinyu-W Jinyu-W merged commit 9fd91ff into v0.3 Aug 31, 2022
@Jinyu-W Jinyu-W deleted the refine_decision_event_type branch August 31, 2022 07:18
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.

2 participants