📚 Can not realize the example as Readme
See original GitHub issueDescription
Firstly, I run a container by arthursjiang/maro:cpu
, and copy the example in readme(Quick Example
) with part of Environment Visualization
and run it:
from maro.simulator import Env
# Enable environment dump feature, when initializing the environment instance
env = Env(scenario="cim",
topology="toy.5p_ssddd_l0.0",
start_tick=0,
durations=100,
options={"enable-dump-snapshot": "./dump_data"})
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}")
but it will show me this error log:
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-3-2bba340a34d8> in <module>
1 from maro.simulator import Env
2
----> 3 env = Env(scenario="cim", topology="toy.5p_ssddd_l0.0", start_tick=0, durations=100, options={"enable-dump-snapshot": "./dump_data"})
4
5 metrics, decision_event, is_done = env.step(None)
/usr/local/lib/python3.6/site-packages/maro/simulator/core.py in __init__(self, scenario, topology, start_tick, durations, snapshot_resolution, max_snapshots, decision_mode, business_engine_cls, disable_finished_events, options)
69 parent_path = self._additional_options["enable-dump-snapshot"]
70 self._converter = DumpConverter(parent_path, self._business_engine._scenario_name)
---> 71 self._converter.reset_folder_path()
72
73 def step(self, action):
/usr/local/lib/python3.6/site-packages/maro/data_lib/dump_csv_converter.py in reset_folder_path(self)
51
52 def reset_folder_path(self):
---> 53 self._generate_new_folder(self._parent_path)
54 self._serial = 0
55
/usr/local/lib/python3.6/site-packages/maro/data_lib/dump_csv_converter.py in _generate_new_folder(self, parent_path)
36 if folder_path.exists():
37 return
---> 38 os.mkdir(self._foldername)
39
40 @property
FileNotFoundError: [Errno 2] No such file or directory: './dump_data/snapshot_dump_2021_01_11_03_01_56_834'
I realized this will caused by this file (dump_data
) does not in this folder. So, I use FIND script try to find out where the file is. But, the log like this:
shaiic@zy-openpai-marketplace:~/zhangy/maro$ ls
CHANGELOG.md CITATION CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE MANIFEST.in README.md SECURITY.md docker_files docs examples maro notebooks playground.md pyproject.toml requirements.dev.txt scripts setup.py tests
shaiic@zy-openpai-marketplace:~/zhangy/maro$ find . -name "dump_data.*"
shaiic@zy-openpai-marketplace:~/zhangy/maro$ find . -name "dump_data"
This is my server configuration:
shaiic@zy-openpai-marketplace:~/zhangy/maro$ neofetch
.-/+oossssoo+/-. shaiic@zy-openpai-marketplace
`:+ssssssssssssssssss+:` -----------------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 18.04.5 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Host: Virtual Machine 7.0
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.4.0-1031-azure
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 68 days, 1 hour, 39 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 640
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 4.4.20
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Terminal: vscode
ossyNMMMNyMMhsssssssssssssshmmmhssssssso CPU: Intel Xeon Platinum 8171M (4) @ 2.095GHz
ossyNMMMNyMMhsssssssssssssshmmmhssssssso GPU: Microsoft Corporation Hyper-V virtual VGA
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Memory: 753MiB / 15987MiB
.ssssssssdMMMNhsssssssssshNMMMdssssssss.
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
+sssssssssdmydMMMMMMMMddddyssssssss+
/ssssssssssshdmNNNNmyNMMMMhssssss/
.ossssssssssssssssssdMMMNysssso.
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
So, How can I get result like this?
By the way, should I install Maro by resouce code before Or What dependence I need to get before to run script in Readme.md L149?
# Inspect environment with the dump data
maro inspector env --source ./dump_data
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
README File – Everything you Need to Know - Great Learning
A README file is a text file that describes and launches a project. It comprises information that is frequently needed to grasp the...
Read more >Configure github to use some other file as README
In the root directory of your repo, create a folder named .github . Create a file named README.md in this folder. Save the...
Read more >How to write a good README for your GitHub project?
Writing a good README - newbies manual ... Open a README.md. file in a new project. Make sure the file always includes the...
Read more >How to make the perfect Readme.md on GitHub - Medium
It may or may not be helpful sometimes, It totally depends on the project you are making. If it is an app or...
Read more >Guide to writing "readme" style metadata
Guide to writing "readme" style metadata. A readme file provides information about a data file and is intended to help ensure that ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@micli Thank you, I’ll try it
Close it as it was fixed, feel free to re-open it if there is any problem.