MARO Python Package
Project description
Multi-Agent Resource Optimization (MARO) platform is an instance of Reinforcement learning as a Service (RaaS) for real-world resource optimization. It can be applied to many important industrial domains, such as container inventory management in logistics, bike repositioning in transportation, virtual machine provisioning in data centers, and asset management in finance. Besides Reinforcement Learning (RL), it also supports other planning/decision mechanisms, such as Operations Research.
Key Components of MARO:
Simulation toolkit: it provides some predefined scenarios, and the reusable wheels for building new scenarios.
RL toolkit: it provides a full-stack abstraction for RL, such as agent manager, agent, RL algorithms, learner, actor, and various shapers.
Distributed toolkit: it provides distributed communication components, interface of user-defined functions for message auto-handling, cluster provision, and job orchestration.
Contents
File/folder |
Description |
---|---|
maro |
MARO source code. |
docs |
MARO docs, it is host on readthedocs. |
examples |
Showcase of MARO. |
notebooks |
MARO quick-start notebooks. |
Install MARO from PyPI
Max OS / Linux
pip install pymaro
Windows
# Install torch first, if you don't have one. pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html pip install pymaro
Install MARO from Source (Editable Mode)
Prerequisites
C++ Compiler
Linux or Mac OS X: gcc
Windows: Build Tools for Visual Studio 2017
Enable Virtual Environment
Mac OS / Linux
# If your environment is not clean, create a virtual environment firstly. python -m venv maro_venv source ./maro_venv/bin/activate
Windows
# If your environment is not clean, create a virtual environment firstly. python -m venv maro_venv .\maro_venv\Scripts\activate # You may need this for SecurityError in PowerShell. Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Install MARO
Mac OS / Linux
# Install MARO from source. bash scripts/install_maro.sh
Windows
# Install MARO from source. .\scripts\install_maro.bat
Quick Example
from maro.simulator import Env
env = Env(scenario="cim", topology="toy.5p_ssddd_l0.0", start_tick=0, durations=100)
metrics, decision_event, is_done = env.step(None)
while not is_done:
metrics, decision_event, is_done = env.step(None)
print(f"environment metrics: {env.metrics}")
Run Playground
Pull from Docker Hub
# 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
Build from source
Mac OS / Linux
# Build playground image. bash ./scripts/build_playground.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 maro/playground:cpu
Windows
# Build playground image. .\scripts\build_playground.bat # 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 maro/playground:cpu
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
License
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for pymaro-0.1.1a11-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d71ea7f3b73263b29d14b08efa53cc4b78a2ca6d45f4e2f197a4ff2452e6807 |
|
MD5 | e6b1539959d2b2a1171277cb226c1aa4 |
|
BLAKE2b-256 | ad88663d3e862145235a693e089e1ed0ead2a9d434654dbabb3269f62951ca02 |
Hashes for pymaro-0.1.1a11-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4a71284572e791cc8b1b5b7a4bce3a21d471488fc7a24033cf38fa161d994a4 |
|
MD5 | 8f79e48c1d9529d712f8ce2ed11e1f2a |
|
BLAKE2b-256 | e452ecb3fd190ceadb6488f17fedbfa7e13bf325904f87c87d7c0f2f531b0514 |
Hashes for pymaro-0.1.1a11-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90574c0ee109dbaa0032b2a598f28302fb8602c65e50509253d2cceb66974597 |
|
MD5 | 57f430e120a533a628898568274392d5 |
|
BLAKE2b-256 | 9fddd8275a2031f7a7e2e4fc355093925fda58004173c38021c4324ca995e5e1 |
Hashes for pymaro-0.1.1a11-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cf6ae1d816af64c193529b9aedf67c3fa3d76b2682d764bc7cad54936c1157a |
|
MD5 | b872b7b5ae757fe6f9cd24b931a5e529 |
|
BLAKE2b-256 | a3863abf7a84bac40ec21790154d38761f1c5bfc76dc0fe104c2fe90edb86188 |
Hashes for pymaro-0.1.1a11-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a8cca13ca397248dc48d591f73dfd393262fcf0fce79e63ec12aa6f698f1fdc |
|
MD5 | aa51d3aaf5ac29c816f5109708c6afc0 |
|
BLAKE2b-256 | ca0b45c087dfbb30a2ef00bee0678d9c61952f33e09eacee229abde9a8afcd20 |
Hashes for pymaro-0.1.1a11-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00cbd6d1851f307fb8114bb691698a01c7f8fdca3b392cd36d8636cda71f2dd4 |
|
MD5 | 913e80aaf5014933b3bc3b83bca230ba |
|
BLAKE2b-256 | 5e8683eb69bd18e1ef957b23f006981b0d31be9600939ffabd23e44c3740f36d |
Hashes for pymaro-0.1.1a11-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | adea92d782c36fee0e7111234036d8d2b1cf88bc6e59d5a69619cc36bafb9cee |
|
MD5 | e0ecd2fb703ed2654b943eef6e626568 |
|
BLAKE2b-256 | ddb0c67b0d814e2a32f8dae1ecbc5e3487d363b141911caefa50652cd4ea2c22 |
Hashes for pymaro-0.1.1a11-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c8431c6906a4276d88dd31ab4c105b130ab1bbd20c5b60bbc4bbe49fa3c86c1 |
|
MD5 | e9302d8018b2f7f26ceb224703f24406 |
|
BLAKE2b-256 | e4a10e1cbfc9614e7d417d3537567a8b9e2e5bcdee9873d8e55952b1248ed653 |