diff --git a/docs/source/installation/playground.md b/docs/source/installation/playground.md index f3ef4a22c..dff1a9b8d 100644 --- a/docs/source/installation/playground.md +++ b/docs/source/installation/playground.md @@ -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 @@ -27,7 +27,7 @@ - Windows - ```powershell + ``` # Build playground image. .\scripts\build_playground.bat diff --git a/docs/source/scenarios/citi_bike.md b/docs/source/scenarios/citi_bike.md index 7cdb36b3f..f3b8e5124 100644 --- a/docs/source/scenarios/citi_bike.md +++ b/docs/source/scenarios/citi_bike.md @@ -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 diff --git a/docs/source/scenarios/container_inventory_management.md b/docs/source/scenarios/container_inventory_management.md index 857455b1d..06b302c8d 100644 --- a/docs/source/scenarios/container_inventory_management.md +++ b/docs/source/scenarios/container_inventory_management.md @@ -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 diff --git a/examples/cim/dqn/README.md b/examples/cim/dqn/README.md index 0bbbab1c4..f8825d3e5 100644 --- a/examples/cim/dqn/README.md +++ b/examples/cim/dqn/README.md @@ -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 diff --git a/examples/cim/dqn/components/__init__.py b/examples/cim/dqn/components/__init__.py new file mode 100644 index 000000000..b14b47650 --- /dev/null +++ b/examples/cim/dqn/components/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. diff --git a/examples/cim/dqn/components/agent_manager.py b/examples/cim/dqn/components/agent_manager.py index b4b90101d..59eaf0956 100644 --- a/examples/cim/dqn/components/agent_manager.py +++ b/examples/cim/dqn/components/agent_manager.py @@ -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 diff --git a/examples/cim/dqn/components/state_shaper.py b/examples/cim/dqn/components/state_shaper.py index 6d7334570..0935ef218 100644 --- a/examples/cim/dqn/components/state_shaper.py +++ b/examples/cim/dqn/components/state_shaper.py @@ -2,6 +2,7 @@ # Licensed under the MIT license. import numpy as np + from maro.rl import StateShaper diff --git a/examples/cim/dqn/components/dist_actor.py b/examples/cim/dqn/dist_actor.py similarity index 89% rename from examples/cim/dqn/components/dist_actor.py rename to examples/cim/dqn/dist_actor.py index 77d8dc7a2..350f493f2 100644 --- a/examples/cim/dqn/components/dist_actor.py +++ b/examples/cim/dqn/dist_actor.py @@ -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__": diff --git a/examples/cim/dqn/components/dist_learner.py b/examples/cim/dqn/dist_learner.py similarity index 92% rename from examples/cim/dqn/components/dist_learner.py rename to examples/cim/dqn/dist_learner.py index edc54913f..08f1d777e 100644 --- a/examples/cim/dqn/components/dist_learner.py +++ b/examples/cim/dqn/dist_learner.py @@ -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__": diff --git a/examples/cim/dqn/multi_process_launcher.py b/examples/cim/dqn/multi_process_launcher.py index a3111e29e..9ec989550 100644 --- a/examples/cim/dqn/multi_process_launcher.py +++ b/examples/cim/dqn/multi_process_launcher.py @@ -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) diff --git a/examples/cim/dqn/single_process_launcher.py b/examples/cim/dqn/single_process_launcher.py index f13e8e28a..52dce10d5 100644 --- a/examples/cim/dqn/single_process_launcher.py +++ b/examples/cim/dqn/single_process_launcher.py @@ -1,8 +1,8 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT license. -import os import io +import os import yaml import numpy as np @@ -10,15 +10,12 @@ 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__":