Skip to content

Commit

Permalink
V0.1 (#93)
Browse files Browse the repository at this point in the history
* setup v0.1

* rm \n in comments

* QuickStart added for docs.scenarios

* experiment result of citi bike update to 1-month version

* V0.1 issues installation (#38)

* replace pycurl to urllib

* rm pycurl in test requirements

* fix installation issue, update readme, speed up citibike

Co-authored-by: Arthur Jiang <sjian@microsoft.com>

* notebook link added for scenarios

* fix: add missing licenses, refine long lines (#36)

* scenario notebook update (#39)

Co-authored-by: Jinyu Wang <Wang.Jinyu@microsoft.com>

* scenario doc modified according to comments

* doc correction

* scenario doc modified according to comments

* remove examples

* rl toolkit refactoring (#42)

* rl toolkit refactoring

* rename citi_bike

* add new line

Co-authored-by: Arthur Jiang <sjian@microsoft.com>

* fix issue during building playground images (#44)

* citibike doc modified according to comments

* citibike doc update

* scenario experiment result table changed

* annotate the empty experiment results

* merge master into v0.1 for later merging (#47)

* setup v0.1 (#34)

Co-authored-by: Arthur Jiang <sjian@microsoft.com>

* fix pycurl install issue (#35)

Co-authored-by: Arthur Jiang <ArthurSJiang@gmail.com>
Co-authored-by: Arthur Jiang <sjian@microsoft.com>

* refine readme

* fix: recursive copy instead of plain copy (#45)

* update maro overall image

* typo

* add key components

* fix deployment issue in multi envs (#49)

* typo

* refine introduction

* fix typo

* fix readme

* refine readme

* refine readme

* update readme docs link

* fix ~/.maro not exist issue in build (#52)

* fix deployment issue in multi envs

* fix typo

* fix ~/.maro not exist issue in build

* skip deploy when build

* update for comments

* refine logo

* fix toctree

* fix & feat: invalid filename & maro grass status (#51)

* fix: change invalid filename to valid

* feat: add maro grass status

* refine

* refine

* V0.1 test store update (#58)

* updateed test_store.py

* fixed unpicklable store bug

Co-authored-by: ysqyang <v-yangqi@microsoft.com>

* rename ecr 2 cim (#62)

* correct dependencies

* rename ecr to cim for hello, scenario, datalib and tests

* remove unused dependency for build

* add a new line at the end

* a'd

* V0.1 rename to cim in example (#63)

* renamed ecr to cim and removed unwanted files

* renamed ecr to cim in other places

* fixed PR conflicts

* merged with v0.1

Co-authored-by: ysqyang <v-yangqi@microsoft.com>

* fix ut issue under window, now all runpass (#64)

* correct dependencies

* rename ecr to cim for hello, scenario, datalib and tests

* install torch first before test dependencies

* missing ecr 2 cim

* V0.1 ecr rename (#65)

* rename ecr to cim in docs

* ecr renamed for notebooks

* OOCL removed

* rename ecr to cim

* title level modified

* notebook update

Co-authored-by: Jinyu Wang <Wang.Jinyu@microsoft.com>

* temporarily disable weather, fix station id issue (#66)

* fix deployment issue in multi envs

* fix typo

* fix ~/.maro not exist issue in build

* skip deploy when build

* update for comments

* temporarily disable weather info

* replace ecr with cim in setup.py

* replace ecr in manifest

* remove weather check when read data

* fix station id issue

* fix format

* add TODO in comments

* V0.1 ecr rename (#67)

* rename ecr to cim in docs

* ecr renamed for notebooks

* OOCL removed

* rename ecr to cim

* title level modified

* notebook update

* topo renamed

Co-authored-by: Jinyu Wang <Wang.Jinyu@microsoft.com>

* change the keys in metrics (#68)

* correct dependencies

* rename ecr to cim for hello, scenario, datalib and tests

* install torch first before test dependencies

* missing ecr 2 cim

* rename metrics keys

* remove transfer cost factor

* rename cost to number

* update setup

* Update build_wheel.yml

* Update build_wheel.yml

* Update build_wheel.yml

* Update build_wheel.yml

* rm install from PyPi

* V0.1 cim nb (#70)

* added cim nb

* fixed bugs in nb

* fixed bugs in nb

* fixed a bug in nb

Co-authored-by: ysqyang <v-yangqi@microsoft.com>

* the font size of doc diagrams is enlarged (#73)

* the font size of doc diagrams is enlarged

* disable APIDOC

Co-authored-by: Jinyu Wang <Wang.Jinyu@microsoft.com>

* str() and repr() of DecisionEvent and Action added; notebook output updated (#74)

Co-authored-by: Jinyu Wang <Wang.Jinyu@microsoft.com>

* Update deploy_gh_pages.yml

* fix docker build

* V0.1 feature docker ci (#77)

* Update deploy_docker_image.yml

* Update deploy_docker_image.yml

* Update deploy_docker_image.yml

* Update deploy_docker_image.yml

* refine

* add contributing

Co-authored-by: Arthur Jiang <sjian@microsoft.com>

* update playground docs

* fixed a key error in K-step shaper for CIM (#80)

Co-authored-by: ysqyang <v-yangqi@microsoft.com>

* V0.1 baseline results (#81)

* adding baseline results

* updated ecr results

* updated cim baseline results

* added citibike no_action results

* restored cim/hello.py

* cim result update

* citibike result update

* added missing files

* fixed a bug

* updated citibike random repositioning results

* completed baseline results

* update citi bike results

* format update

* remove runner files

Co-authored-by: ysqyang <v-yangqi@microsoft.com>
Co-authored-by: Jinyu Wang <Wang.Jinyu@microsoft.com>

* duplicated notebook removed

* update distributed example (#69)

* update distributed example

* add config.py for distributed mode examples

* add new_line in config.py

* repalce title with caps

* add test and build badge (#76)

* correct dependencies

* rename ecr to cim for hello, scenario, datalib and tests

* install torch first before test dependencies

* missing ecr 2 cim

* rename metrics keys

* remove transfer cost factor

* rename cost to number

* add badge

* change unittest to test

* add docker image badge

* remove unexist folders

* ignore badges, ignore examples as module

* remove __init__ file from examples

* V0.1 k step key error fix (#84)

* fixed a key error in K-step shaper for CIM

* fixed key error in k-step shaper in dist_actor

Co-authored-by: ysqyang <v-yangqi@microsoft.com>

* fixed unpicklable bug in k step shaper (#87)

Co-authored-by: ysqyang <v-yangqi@microsoft.com>

* Update and rename unittests.yml to test.yml

* code block format update

* removed sentence above title (#90)

Co-authored-by: ysqyang <v-yangqi@microsoft.com>

* cim results update * 20 (#88)

Co-authored-by: Jinyu Wang <Wang.Jinyu@microsoft.com>

* V0.1 import bug fix in example (#86)

* fixed a key error in K-step shaper for CIM

* fixing import bugs

* removed a blank line and an unwanted import

* added __init__ in components and changed import accordingly

* added . before components

* removed . before components

* moved dist_actor and dist_learner out of components

* fixed a bug

* fixed import formatting

* fixed import formatting

* removed config read from single_process_launcher

* restored absolute path for running dist_actor and dist_learner

* fixed a bug

Co-authored-by: ysqyang <v-yangqi@microsoft.com>

* updated citibike resposition number column

* fixed table formatiing

Co-authored-by: Arthur Jiang <sjian@microsoft.com>
Co-authored-by: Jinyu Wang <Wang.Jinyu@microsoft.com>
Co-authored-by: Arthur Jiang <ArthurSJiang@gmail.com>
Co-authored-by: Romic Huang <romic.hlc@outlook.com>
Co-authored-by: kaiqli <59279714+kaiqli@users.noreply.github.com>
Co-authored-by: Chaos Yu <chaos.you@gmail.com>
Co-authored-by: Romic Huang <romic.kid@gmail.com>
Co-authored-by: zhanyu wang <pocket_2001@163.com>
Co-authored-by: ysqyang <ysqyang@gmail.com>
Co-authored-by: ysqyang <v-yangqi@microsoft.com>
  • Loading branch information
11 people authored Sep 24, 2020
1 parent 215b43f commit e75b693
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 110 deletions.
16 changes: 8 additions & 8 deletions docs/source/installation/playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Pull from [Docker Hub](https://hub.docker.com/repository/registry-1.docker.io/arthursjiang/maro/tags?page=1)

```sh
# Run playground container.
# Redis commander (GUI for redis) -> http://127.0.0.1:40009
# Local host docs -> http://127.0.0.1:40010
# Jupyter lab with maro -> http://127.0.0.1:40011
docker run -p 40009:40009 -p 40010:40010 -p 40011:40011 arthursjiang/maro:cpu
```
```sh
# Run playground container.
# Redis commander (GUI for redis) -> http://127.0.0.1:40009
# Local host docs -> http://127.0.0.1:40010
# Jupyter lab with maro -> http://127.0.0.1:40011
docker run -p 40009:40009 -p 40010:40010 -p 40011:40011 arthursjiang/maro:cpu
```

## Run from Source

Expand All @@ -27,7 +27,7 @@

- Windows

```powershell
```
# Build playground image.
.\scripts\build_playground.bat
Expand Down
66 changes: 33 additions & 33 deletions docs/source/scenarios/citi_bike.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,48 +201,48 @@ the environment and test for a duration of 1 week.

| Topology | Total Requirement | Resource Shortage | Repositioning Number|
| :-------: | :---------------: | :---------------: | :-----------------: |
| toy.3s_4t | 15,154 | 8,422 +/- 11 | 449 +/- 22 |
| toy.4s_4t | 10,186 | 4,371 +/- 72 | 3,392 +/- 83 |
| toy.5s_6t | 16,171 | 7,513 +/- 40 | 3,242 +/- 71 |
| toy.3s_4t | 15,154 | 8,422 +/- 11 | 449 +/- 22 |
| toy.4s_4t | 10,186 | 4,371 +/- 72 | 3,392 +/- 83 |
| toy.5s_6t | 16,171 | 7,513 +/- 40 | 3,242 +/- 71 |

| Topology | Total Requirement | Resource Shortage | Repositioning Number|
| :-------: | :---------------: | :---------------: | :-----------------: |
| ny.201801 | 48,089 | 6,693 +/- 138 | 22,300 +/- 338 |
| ny.201802 | 126,374 | 21,418 +/- 120 | 22,328 +/- 175 |
| ny.201803 | 138,952 | 22,121 +/- 272 | 22,413 +/- 91 |
| ny.201804 | 161,443 | 22,201 +/- 194 | 22,685 +/- 185 |
| ny.201805 | 323,375 | 54,365 +/- 538 | 23,539 +/- 267 |
| ny.201806 | 305,971 | 49,876 +/- 1,091 | 24,072 +/- 349 |
| ny.201807 | 254,715 | 46,199 +/- 204 | 24,189 +/- 49 |
| ny.201808 | 302,589 | 53,679 +/- 433 | 24,257 +/- 127 |
| ny.201809 | 313,002 | 61,432 +/- 75 | 23,743 +/- 145 |
| ny.201810 | 339,268 | 64,269 +/- 600 | 23,096 +/- 51 |
| ny.201811 | 263,227 | 40,440 +/- 239 | 23,353 +/- 330 |
| ny.201812 | 209,102 | 26,067 +/- 234 | 22,859 +/- 322 |
| ny.201801 | 48,089 | 6,693 +/- 138 | 445,996 +/- 6,756 |
| ny.201802 | 126,374 | 21,418 +/- 120 | 446,564 +/- 3,505 |
| ny.201803 | 138,952 | 22,121 +/- 272 | 448,259 +/- 1,831 |
| ny.201804 | 161,443 | 22,201 +/- 194 | 453,705 +/- 3,697 |
| ny.201805 | 323,375 | 54,365 +/- 538 | 470,771 +/- 5,337 |
| ny.201806 | 305,971 | 49,876 +/- 1,091 | 481,443 +/- 6,981 |
| ny.201807 | 254,715 | 46,199 +/- 204 | 483,788 +/- 982 |
| ny.201808 | 302,589 | 53,679 +/- 433 | 485,137 +/- 2,557 |
| ny.201809 | 313,002 | 61,432 +/- 75 | 474,851 +/- 2,908 |
| ny.201810 | 339,268 | 64,269 +/- 600 | 461,928 +/- 1,018 |
| ny.201811 | 263,227 | 40,440 +/- 239 | 467,050 +/- 6,595 |
| ny.201812 | 209,102 | 26,067 +/- 234 | 457,173 +/- 6,444 |

| Topology | Total Requirement | Resource Shortage | Repositioning Number|
| :-------: | :---------------: | :---------------: | :-----------------: |
| ny.201901 | 161,474 | 19,295 +/- 155 | 22,222 +/- 114 |
| ny.201902 | 187,354 | 23,875 +/- 282 | 22,844 +/- 18 |
| ny.201903 | 148,371 | 12,451 +/- 312 | 20,461 +/- 270 |
| ny.201904 | 280,852 | 29,591 +/- 170 | 23,234 +/- 307 |
| ny.201905 | 287,290 | 44,199 +/- 542 | 24,254 +/- 307 |
| ny.201906 | 379,415 | 51,396 +/- 256 | 25,175 +/- 237 |
| ny.201907 | 309,365 | 33,861 +/- 643 | 25,022 +/- 215 |
| ny.201908 | 371,969 | 51,319 +/- 417 | 25,834 +/- 70 |
| ny.201909 | 344,847 | 34,532 +/- 466 | 23,848 +/- 197 |
| ny.201910 | 351,855 | 37,828 +/- 502 | 24,807 +/- 208 |
| ny.201911 | 324,327 | 34,745 +/- 427 | 24,230 +/- 439 |
| ny.201912 | 184,015 | 20,119 +/- 110 | 21,866 +/- 296 |
| ny.201901 | 161,474 | 19,295 +/- 155 | 444,445 +/- 2,287 |
| ny.201902 | 187,354 | 23,875 +/- 282 | 456,888 +/- 362 |
| ny.201903 | 148,371 | 12,451 +/- 312 | 409,226 +/- 5,392 |
| ny.201904 | 280,852 | 29,591 +/- 170 | 464,671 +/- 6,148 |
| ny.201905 | 287,290 | 44,199 +/- 542 | 485,077 +/- 6,140 |
| ny.201906 | 379,415 | 51,396 +/- 256 | 503,503 +/- 4,742 |
| ny.201907 | 309,365 | 33,861 +/- 643 | 500,443 +/- 4,314 |
| ny.201908 | 371,969 | 51,319 +/- 417 | 516,684 +/- 1,400 |
| ny.201909 | 344,847 | 34,532 +/- 466 | 476,965 +/- 3,932 |
| ny.201910 | 351,855 | 37,828 +/- 502 | 496,135 +/- 4,167 |
| ny.201911 | 324,327 | 34,745 +/- 427 | 484,599 +/- 8,771 |
| ny.201912 | 184,015 | 20,119 +/- 110 | 437,311 +/- 5,936 |

| Topology | Total Requirement | Resource Shortage | Repositioning Number|
| :-------: | :---------------: | :---------------: | :-----------------: |
| ny.202001 | 169,304 | 17,152 +/- 218 | 23,841 +/- 53 |
| ny.202002 | 206,105 | 24,223 +/- 209 | 24,001 +/- 77 |
| ny.202003 | 235,986 | 23,749 +/- 654 | 22,927 +/- 73 |
| ny.202004 | 91,810 | 3,349 +/- 48 | 16,341 +/- 157 |
| ny.202005 | 169,412 | 10,177 +/- 216 | 18,902 +/- 121 |
| ny.202006 | 197,883 | 11,741 +/- 170 | 17,497 +/- 219 |
| ny.202001 | 169,304 | 17,152 +/- 218 | 476,821 +/- 1,052 |
| ny.202002 | 206,105 | 24,223 +/- 209 | 480,012 +/- 1,547 |
| ny.202003 | 235,986 | 23,749 +/- 654 | 458,536 +/- 1,457 |
| ny.202004 | 91,810 | 3,349 +/- 48 | 326,817 +/- 3.131 |
| ny.202005 | 169,412 | 10,177 +/- 216 | 378,038 +/- 2,429 |
| ny.202006 | 197,883 | 11,741 +/- 170 | 349,932 +/- 4,375 |

## Quick Start

Expand Down
88 changes: 44 additions & 44 deletions docs/source/scenarios/container_inventory_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,53 +186,53 @@ the environment and test for a duration of 1120 ticks (days).

#### Random Repositioning

| Topology | Total Requirement | Resource Shortage | Repositioning Number|
| :--------------: | :---------------: | :-------------------: | :-----------------: |
| toy.4p_ssdd_l0.0 | 2,240,000 | 1,497,138 +/- 30,423 | 209,254 +/- 9,257 |
| toy.4p_ssdd_l0.1 | 2,240,000 | 1,623,710 +/- 36,421 | 100,918 +/- 1,835 |
| toy.4p_ssdd_l0.2 | 2,240,000 | 1,501,466 +/- 48,566 | 107,259 +/- 4,015 |
| toy.4p_ssdd_l0.3 | 2,239,460 | 1,577,011 +/- 35,109 | 104,925 +/- 1,756 |
| toy.4p_ssdd_l0.4 | 2,244,068 | 1,501,835 +/- 103,196 | 109,024 +/- 1,651 |
| toy.4p_ssdd_l0.5 | 2,244,068 | 1,546,227 +/- 81,107 | 103,866 +/- 5,687 |
| toy.4p_ssdd_l0.6 | 2,244,068 | 1,578,863 +/- 127,815 | 111,036 +/- 5,333 |
| toy.4p_ssdd_l0.7 | 2,244,068 | 1,519,495 +/- 60,555 | 122,074 +/- 3,985 |
| toy.4p_ssdd_l0.8 | 2,241,716 | 1,603,063 +/- 109,149 | 125,946 +/- 9,660 |

| Topology | Total Requirement | Resource Shortage | Repositioning Number|
| :---------------: | :---------------: | :-------------------: | :-----------------: |
| toy.5p_ssddd_l0.0 | 2,240,000 | 1,371,021 +/- 34,619 | 198,306 +/- 6,948 |
| toy.5p_ssddd_l0.1 | 2,240,000 | 1,720,068 +/- 18,939 | 77,514 +/- 1,280 |
| toy.5p_ssddd_l0.2 | 2,240,000 | 1,716,435 +/- 15,499 | 74,843 +/- 1,563 |
| toy.5p_ssddd_l0.3 | 2,239,460 | 1,700,456 +/- 26,510 | 79,332 +/- 575 |
| toy.5p_ssddd_l0.4 | 2,244,068 | 1,663,139 +/- 34,244 | 79,708 +/- 5,152 |
| toy.5p_ssddd_l0.5 | 2,244,068 | 1,681,519 +/- 107,863 | 81,768 +/- 3,094 |
| toy.5p_ssddd_l0.6 | 2,244,068 | 1,660,330 +/- 38,318 | 81,503 +/- 4,079 |
| toy.5p_ssddd_l0.7 | 2,244,068 | 1,709,022 +/- 31,440 | 92,717 +/- 8,354 |
| toy.5p_ssddd_l0.8 | 2,241,716 | 1,763,950 +/- 73,935 | 92,921 +/- 3,034 |

| Topology | Total Requirement | Resource Shortage | Repositioning Number|
| :----------------: | :---------------: | :------------------: | :-----------------: |
| toy.6p_sssbdd_l0.0 | 2,240,000 | 1,529,774 +/- 73,104 | 199,478 +/- 11,637 |
| toy.6p_sssbdd_l0.1 | 2,240,000 | 1,736,385 +/- 16,736 | 56,106 +/- 1,448 |
| toy.6p_sssbdd_l0.2 | 2,240,000 | 1,765,945 +/- 4,680 | 52,626 +/- 2,201 |
| toy.6p_sssbdd_l0.3 | 2,239,460 | 1,811,987 +/- 15,436 | 49,937 +/- 3,484 |
| toy.6p_sssbdd_l0.4 | 2,244,068 | 1,783,362 +/- 39,122 | 52,993 +/- 2,455 |
| toy.6p_sssbdd_l0.5 | 2,244,068 | 1,755,551 +/- 44,855 | 55,055 +/- 2,759 |
| toy.6p_sssbdd_l0.6 | 2,244,068 | 1,830,504 +/- 10,690 | 57,083 +/- 526 |
| toy.6p_sssbdd_l0.7 | 2,244,068 | 1,742,129 +/- 23,910 | 65,571 +/- 3,228 |
| toy.6p_sssbdd_l0.8 | 2,241,716 | 1,761,283 +/- 22,338 | 66,827 +/- 1,501 |
| Topology | Total Requirement | Resource Shortage | Repositioning Number |
| :--------------: | :---------------: | :-------------------: | :-------------------: |
| toy.4p_ssdd_l0.0 | 2,240,000 | 1,497,138 +/- 30,423 | 4,185,080 +/- 185,140 |
| toy.4p_ssdd_l0.1 | 2,240,000 | 1,623,710 +/- 36,421 | 2,018,360 +/- 36,700 |
| toy.4p_ssdd_l0.2 | 2,240,000 | 1,501,466 +/- 48,566 | 2,145,180 +/- 90,300 |
| toy.4p_ssdd_l0.3 | 2,239,460 | 1,577,011 +/- 35,109 | 2,098,500 +/- 35,120 |
| toy.4p_ssdd_l0.4 | 2,244,068 | 1,501,835 +/- 103,196 | 2,180,480 +/- 33,020 |
| toy.4p_ssdd_l0.5 | 2,244,068 | 1,546,227 +/- 81,107 | 2,077,320 +/- 113,740 |
| toy.4p_ssdd_l0.6 | 2,244,068 | 1,578,863 +/- 127,815 | 2,220,720 +/- 106,660 |
| toy.4p_ssdd_l0.7 | 2,244,068 | 1,519,495 +/- 60,555 | 2,441,480 +/- 79,700 |
| toy.4p_ssdd_l0.8 | 2,241,716 | 1,603,063 +/- 109,149 | 2,518,920 +/- 193,200 |

| Topology | Total Requirement | Resource Shortage | Repositioning Number |
| :---------------: | :---------------: | :-------------------: | :-------------------: |
| toy.5p_ssddd_l0.0 | 2,240,000 | 1,371,021 +/- 34,619 | 3,966,120 +/- 138,960 |
| toy.5p_ssddd_l0.1 | 2,240,000 | 1,720,068 +/- 18,939 | 1,550,280 +/- 25,600 |
| toy.5p_ssddd_l0.2 | 2,240,000 | 1,716,435 +/- 15,499 | 1,496,860 +/- 31,260 |
| toy.5p_ssddd_l0.3 | 2,239,460 | 1,700,456 +/- 26,510 | 1,586,640 +/- 11,500 |
| toy.5p_ssddd_l0.4 | 2,244,068 | 1,663,139 +/- 34,244 | 1,594,160 +/- 103,040 |
| toy.5p_ssddd_l0.5 | 2,244,068 | 1,681,519 +/- 107,863 | 1,635,360 +/- 61,880 |
| toy.5p_ssddd_l0.6 | 2,244,068 | 1,660,330 +/- 38,318 | 1,630,060 +/- 81,580 |
| toy.5p_ssddd_l0.7 | 2,244,068 | 1,709,022 +/- 31,440 | 1,854,340 +/- 167,080 |
| toy.5p_ssddd_l0.8 | 2,241,716 | 1,763,950 +/- 73,935 | 1,858,420 +/- 60,680 |

| Topology | Total Requirement | Resource Shortage | Repositioning Number |
| :----------------: | :---------------: | :------------------: | :-------------------: |
| toy.6p_sssbdd_l0.0 | 2,240,000 | 1,529,774 +/- 73,104 | 3,989,560 +/- 232,740 |
| toy.6p_sssbdd_l0.1 | 2,240,000 | 1,736,385 +/- 16,736 | 1,122,120 +/- 28,960 |
| toy.6p_sssbdd_l0.2 | 2,240,000 | 1,765,945 +/- 4,680 | 1,052,520 +/- 44,020 |
| toy.6p_sssbdd_l0.3 | 2,239,460 | 1,811,987 +/- 15,436 | 998,740 +/- 69,680 |
| toy.6p_sssbdd_l0.4 | 2,244,068 | 1,783,362 +/- 39,122 | 1,059,860 +/- 49,100 |
| toy.6p_sssbdd_l0.5 | 2,244,068 | 1,755,551 +/- 44,855 | 1,101,100 +/- 55,180 |
| toy.6p_sssbdd_l0.6 | 2,244,068 | 1,830,504 +/- 10,690 | 1,141,660 +/- 10,520 |
| toy.6p_sssbdd_l0.7 | 2,244,068 | 1,742,129 +/- 23,910 | 1,311,420 +/- 64,560 |
| toy.6p_sssbdd_l0.8 | 2,241,716 | 1,761,283 +/- 22,338 | 1,336,540 +/- 30,020 |

| Topology | Total Requirement | Resource Shortage | Repositioning Number|
| :-------------------: | :---------------: | :------------------: | :-----------------: |
| global_trade.22p_l0.0 | 2,240,000 | 1,010,009 +/- 20,942 | 27,412 +/- 730 |
| global_trade.22p_l0.1 | 2,240,000 | 1,027,395 +/- 19,183 | 9,408 +/- 647 |
| global_trade.22p_l0.2 | 2,240,000 | 1,035,851 +/- 4,352 | 9,062 +/- 262 |
| global_trade.22p_l0.3 | 2,239,460 | 1,032,480 +/- 1,332 | 9,511 +/- 446 |
| global_trade.22p_l0.4 | 2,244,068 | 1,034,412 +/- 11,689 | 9,304 +/- 314 |
| global_trade.22p_l0.5 | 2,244,068 | 1,042,869 +/- 16,146 | 9,436 +/- 394 |
| global_trade.22p_l0.6 | 2,244,068 | 1,096,502 +/- 26,896 | 15,114 +/- 1,377 |
| global_trade.22p_l0.7 | 2,244,068 | 1,144,981 +/- 5,355 | 14,176 +/- 1,285 |
| global_trade.22p_l0.8 | 2,241,716 | 1,154,184 +/- 7,043 | 13,548 +/- 112 |
| global_trade.22p_l0.0 | 2,240,000 | 1,010,009 +/- 20,942 | 548,240 +/- 14,600 |
| global_trade.22p_l0.1 | 2,240,000 | 1,027,395 +/- 19,183 | 188,160 +/- 12,940 |
| global_trade.22p_l0.2 | 2,240,000 | 1,035,851 +/- 4,352 | 181,240 +/- 5,240 |
| global_trade.22p_l0.3 | 2,239,460 | 1,032,480 +/- 1,332 | 190,220 +/- 8,920 |
| global_trade.22p_l0.4 | 2,244,068 | 1,034,412 +/- 11,689 | 186,080 +/- 6,280 |
| global_trade.22p_l0.5 | 2,244,068 | 1,042,869 +/- 16,146 | 188,720 +/- 7,880 |
| global_trade.22p_l0.6 | 2,244,068 | 1,096,502 +/- 26,896 | 302,280 +/- 27,540 |
| global_trade.22p_l0.7 | 2,244,068 | 1,144,981 +/- 5,355 | 283,520 +/- 25,700 |
| global_trade.22p_l0.8 | 2,241,716 | 1,154,184 +/- 7,043 | 270,960 +/- 2,240 |

## Quick Start

Expand Down
3 changes: 0 additions & 3 deletions examples/cim/dqn/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
This file contains instructions on how to use MARO on the Container Inventory
Management (CIM) scenario.

# Overview

The CIM problem is one of the quintessential use cases of MARO. The example can
Expand Down
2 changes: 2 additions & 0 deletions examples/cim/dqn/components/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
4 changes: 2 additions & 2 deletions examples/cim/dqn/components/agent_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from torch.nn.functional import smooth_l1_loss
from torch.optim import RMSprop

from agent import CIMAgent
from config import config
from .agent import CIMAgent
from .config import config
from maro.rl import AbsAgentManager, LearningModel, MLPDecisionLayers, DQN, DQNHyperParams, ColumnBasedStore
from maro.utils import set_seeds

Expand Down
1 change: 1 addition & 0 deletions examples/cim/dqn/components/state_shaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under the MIT license.

import numpy as np

from maro.rl import StateShaper


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

from maro.simulator import Env
from maro.rl import AgentMode, SimpleActor, ActorWorker, KStepExperienceShaper, TwoPhaseLinearExplorer
from config import config
from state_shaper import CIMStateShaper
from action_shaper import CIMActionShaper
from experience_shaper import TruncatedExperienceShaper
from agent_manager import DQNAgentManager

from components.action_shaper import CIMActionShaper
from components.agent_manager import DQNAgentManager
from components.config import config
from components.experience_shaper import TruncatedExperienceShaper
from components.state_shaper import CIMStateShaper


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

import os

from agent_manager import DQNAgentManager
from config import config
from maro.rl import ActorProxy, SimpleLearner, AgentMode, TwoPhaseLinearExplorer
from maro.simulator import Env
from maro.utils import Logger
from state_shaper import CIMStateShaper

from components.agent_manager import DQNAgentManager
from components.config import config
from components.state_shaper import CIMStateShaper


if __name__ == "__main__":
Expand Down
5 changes: 2 additions & 3 deletions examples/cim/dqn/multi_process_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
import os

from components.config import config
from maro.utils import Logger, convert_dottable


ACTOR_NUM = config.distributed.learner.peer["actor_worker"] # must be same as in config
LEARNER_NUM = config.distributed.actor.peer["actor"]

learner_path = f"{os.path.split(os.path.realpath(__file__))[0]}/components/dist_learner.py &"
actor_path = f"{os.path.split(os.path.realpath(__file__))[0]}/components/dist_actor.py &"
learner_path = f"{os.path.split(os.path.realpath(__file__))[0]}/dist_learner.py &"
actor_path = f"{os.path.split(os.path.realpath(__file__))[0]}/dist_actor.py &"

for l_num in range(LEARNER_NUM):
os.system(f"python " + learner_path)
Expand Down
15 changes: 6 additions & 9 deletions examples/cim/dqn/single_process_launcher.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

import os
import io
import os
import yaml

import numpy as np

from maro.simulator import Env
from maro.rl import SimpleLearner, SimpleActor, AgentMode, KStepExperienceShaper, TwoPhaseLinearExplorer
from maro.utils import Logger, convert_dottable
from examples.cim.dqn.components.state_shaper import CIMStateShaper
from examples.cim.dqn.components.action_shaper import CIMActionShaper
from examples.cim.dqn.components.experience_shaper import TruncatedExperienceShaper
from examples.cim.dqn.components.agent_manager import DQNAgentManager


with io.open("config.yml", "r") as in_file:
raw_config = yaml.safe_load(in_file)
config = convert_dottable(raw_config)
from components.action_shaper import CIMActionShaper
from components.agent_manager import DQNAgentManager
from components.config import config
from components.experience_shaper import TruncatedExperienceShaper
from components.state_shaper import CIMStateShaper


if __name__ == "__main__":
Expand Down

0 comments on commit e75b693

Please sign in to comment.