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

Fix diagnostics and update docs #1983

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/resources/diagnostic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ Run
---

Run the diagnostic :func:`~smarts.diagnostic.run.main` with one or multiple scenarios, from the ``SMARTS/smarts/diagnostic`` folder.
Reports will be generated in the ``SMARTS/smarts/diagnostic/reports`` folder.

.. code-block:: bash

$ cd <path/to>/SMARTS
$ python3.8 -m venv ./.venv
$ source ./.venv/bin/activate
$ pip install --upgrade pip
$ pip install -e .[diagnostic]
$ scl diagnostic run <scenarios/path> [scenarios/path]
# e.g., scl diagnostic run n_sumo_actors/1_actors
# e.g., scl diagnostic run n_sumo_actors/1_actors n_agents/1_agents
2 changes: 1 addition & 1 deletion smarts/diagnostic/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _write_report(results: Dict[str, Any]):
plt.savefig(dir / "Fig1.png")
mdFile.new_paragraph(
"<figure>"
f"\n<img src={dir/'Fig1.png'} alt='line chart' style='width:500px;'/>"
f"\n<img src='{dir/'Fig1.png'}' alt='line chart' style='width:500px;'/>"
"\n</figure>"
)

Expand Down