Skip to content

Commit

Permalink
Fix diagnostics (#1983)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adaickalavan authored Apr 26, 2023
1 parent 4f4c965 commit 9e35300
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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

0 comments on commit 9e35300

Please sign in to comment.