Skip to content

Commit

Permalink
Merge pull request #56 from CrayLabs/develop
Browse files Browse the repository at this point in the history
Merge develop to master for release v 0.0.4

[ committed by @al-rigazzi ]
[ reviewed by @AlyssaCote ]
  • Loading branch information
al-rigazzi authored May 14, 2024
2 parents b7660c1 + a0f5a5c commit 69ef170
Show file tree
Hide file tree
Showing 51 changed files with 12,444 additions and 372 deletions.
47 changes: 30 additions & 17 deletions tests/test_builders/test_orc_builder.py → .github/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
# BSD 2-Clause License
#
# Copyright (c) 2021-2024, Hewlett Packard Enterprise
Expand All @@ -23,21 +24,33 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

import pytest

from smartdashboard.utils.ManifestReader import ManifestFileReader
from smartdashboard.view_builders import orc_builder
from smartdashboard.views import OrchestratorView


@pytest.mark.parametrize(
"json_file, return_type",
[
pytest.param("tests/utils/manifest_files/manifesttest.json", OrchestratorView),
],
)
def test_orc_builder(json_file, return_type):
manifest_file_reader = ManifestFileReader(json_file)
manifest = manifest_file_reader.get_manifest()
assert type(orc_builder(manifest)) == return_type
changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: Features
labels:
- 'type: feature'
exclude:
labels:
- non-user-facing
- title: Bug Fixes
labels:
- 'bug: critical'
- 'bug: major'
- 'bug: minor'
exclude:
labels:
- non-user-facing
- title: API Breaks
labels:
- 'API break'
exclude:
labels:
- non-user-facing
- title: Miscellaneous Improvements
labels:
- "*"
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
# BSD 2-Clause License
#
# Copyright (c) 2021-2024, Hewlett Packard Enterprise
Expand All @@ -23,21 +24,26 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

name: enforce_changelog

import pytest
on:
pull_request:
push:
branches:
- develop

from smartdashboard.utils.ManifestReader import ManifestFileReader
from smartdashboard.view_builders import exp_builder
from smartdashboard.views import ExperimentView
jobs:
changelog:
name: check_changelog
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

@pytest.mark.parametrize(
"json_file, return_type",
[
pytest.param("tests/utils/manifest_files/manifesttest.json", ExperimentView),
],
)
def test_exp_builder(json_file, return_type):
manifest_file_reader = ManifestFileReader(json_file)
manifest = manifest_file_reader.get_manifest()
assert type(exp_builder(manifest)) == return_type
- name: Changelog Enforcer
uses: dangoslen/[email protected]
with:
changeLogPath: './doc/changelog.md'
missingUpdateErrorMessage: 'changelog.md has not been updated'
17 changes: 15 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'
python-version: '3.9'

- name: Install build
run: |
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'
python-version: '3.9'

- name: Install build
run: |
Expand Down Expand Up @@ -120,3 +120,16 @@ jobs:
# user: __token__
password: ${{ secrets.PYPI }}
#repository_url: https://test.pypi.org/legacy/


createPullRequest:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create pull request
run: |
gh pr create -B develop -H master --title 'Merge master into develop' --body 'This PR brings develop up to date with master for release.'
env:
GH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
matrix:
os: [macos-12, ubuntu-20.04] # Operating systems
compiler: [8] # GNU compiler version
py_v: [3.8, 3.9, '3.10'] # Python versions
py_v: ['3.9', '3.10', '3.11'] # Python versions

steps:
- uses: actions/checkout@v2
Expand Down
43 changes: 35 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
# SmartDashboard

SmartDashboard is an add-on to SmartSim that provides a dashboard to help users understand and monitor their SmartSim experiments in a visual way. Configuration, status, and logs are available for all launched entities within an experiment for easy inspection.
SmartDashboard is an add-on to SmartSim that provides a dashboard to help users understand and monitor their SmartSim experiments in a visual way. Configuration, status, and logs are available for all launched entities within an experiment for easy inspection, along with memory and client data per shard for launched orchestrators.

A ``Telemetry Monitor`` is a background process that is launched along with the experiment
that produces the data displayed by SmartDashboard. The ``Telemetry Monitor`` can be disabled by
adding ``export SMARTSIM_TELEMETRY_ENABLE=0`` as an environment variable. When disabled, SmartDashboard
will not display any data. To re-enable, set the ``SMARTSIM_TELEMETRY_ENABLE`` environment variable to ``1``
with ``export SMARTSIM_TELEMETRY_ENABLE=1``.
A ``Telemetry Monitor`` is a background process that is launched alongside the experiment.
It is responsible for generating the data displayed by SmartDashboard. The ``Telemetry Monitor`` can be disabled globally by
adding ``export SMARTSIM_FLAG_TELEMETRY=0`` as an environment variable. When disabled, SmartDashboard
will not display entity status data. To re-enable, set the ``SMARTSIM_FLAG_TELEMETRY`` environment variable to ``1``
with ``export SMARTSIM_FLAG_TELEMETRY=1``. For workflows involving multiple experiments, SmartSim provides the attributes
``Experiment.telemetry.enable`` and ``Experiment.telemetry.disable`` to manage the enabling or disabling of telemetry on a per-experiment basis.

Experiment metadata is also stored in the ``.smartsim`` directory, a hidden folder for internal api use and used by the dashboard.
Deletion of the experiment folder will remove all experiment metadata.
`Orchestrator` memory and client data can be collected by enabling database telemetry. To do so, add ``Orchestrator.telemetry.enable``
after creating an `Orchestrator` within the driver script. Database telemetry is enabled per `Orchestrator`, so if there are multiple
`Orchestrators` launched, they will each need to be enabled separately in the driver script.

```python
# enabling telemetry example

from smartsim import Experiment

exp = Experiment("experiment", launcher="auto")
exp.telemetry.enable()

db = exp.create_database(db_nodes=3)
db.telemetry.enable()

exp.start(db, block=True)
exp.stop(db)
```

Experiment metadata is stored in the ``.smartsim`` directory, a hidden folder used by the internal api and accessed by the dashboard.
This folder can be found within the created experiment directory.
Deletion of the experiment folder will remove all associated metadata.

## Installation

Expand Down Expand Up @@ -49,6 +70,7 @@ Example workflow:
from smartsim import Experiment

exp = Experiment("hello_world_exp", launcher="auto")
exp.telemetry.enable()
run = exp.create_run_settings(exe="echo", exe_args="Hello World!")
run.set_tasks(60)
run.set_tasks_per_node(20)
Expand Down Expand Up @@ -99,4 +121,9 @@ Once the dashboard is launched, a browser will open to `http://localhost:<port>`
`Experiment Overview:` This tab is where configuration information, statuses, and logs are located for each launched entity of the experiment. The `Experiment` section displays configuration information for the overall experiment and its logs. In the `Applications` section, also known as SmartSim `Models`, select a launched application to see its status, what it was configured with, and its logs. The `Orchestrators` section also provides configuration and status information, as well as logs per shard for a selected orchestrator. Finally, in the `Ensembles` section, select an ensemble to see its status and configuration. Then select any of its members to see its status, configuration, and logs.
`Database Telemetry:` This tab provides additional details about `Orchestrators`.
The `Orchestrator Summary` section shows configuration and status information of the selected. The `Memory`
section provides memory usage data per shard within the `Orchestrator`. The `Clients`
section displays client data per shard within the `Orchestrator`.
`Help:` This tab links to SmartSim documentation and provides a SmartSim contact for support.
49 changes: 49 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Changelog

### 0.0.4

Released on 14 May 2024

Description

- Fix header styling issue
([SmartDashboard-PR55](https://github.com/CrayLabs/SmartDashboard/pull/55))
- Automate the creation of release notes
([SmartDashboard-PR54](https://github.com/CrayLabs/SmartDashboard/pull/54))
- Add database telemetry documentation.
([SmartDashboard-PR52](https://github.com/CrayLabs/SmartDashboard/pull/52))
- Auto-post release PR to develop from master
([SmartDashboard-PR53](https://github.com/CrayLabs/SmartDashboard/pull/53))
- Decrease the pinned version of Pydantic
([SmartDashboard-PR51](https://github.com/CrayLabs/SmartDashboard/pull/51))
- Bump version to 0.0.4, exclude streamlit version 1.31.X
([SmartDashboard-PR50](https://github.com/CrayLabs/SmartDashboard/pull/50))
- Drop Python 3.8 support, add 3.11 support.
([SmartDashboard-PR49](https://github.com/CrayLabs/SmartDashboard/pull/49))
- Add Database Telemetry page.
([SmartDashboard-PR38](https://github.com/CrayLabs/SmartDashboard/pull/38))
- Add Github Actions workflow that checks if changelog is edited on
pull requests into develop.
([SmartDashboard-PR47](https://github.com/CrayLabs/SmartDashboard/pull/47))
- Add manifest file tracking.
([SmartDashboard-PR46](https://github.com/CrayLabs/SmartDashboard/pull/46))

### 0.0.3

Released on 15 February 2024

Description

- Added defined schemas for entity objects.
([SmartDashboard-PR31](https://github.com/CrayLabs/SmartDashboard/pull/31))
- Added experiment level logs to the dashboard.
([SmartDashboard-PR37](https://github.com/CrayLabs/SmartDashboard/pull/37))

### 0.0.2

Released on 14 December 2023

Description

- The initial release of SmartDashboard includes capabilities for
viewing experiment entity properties and statuses.
27 changes: 0 additions & 27 deletions doc/changelog.rst

This file was deleted.

2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Hewlett Packard Enterprise'

# The full version, including alpha/beta/rc tags
version = "0.0.3"
version = "0.0.4"

# The full version, including alpha/beta/rc tags
release = version
Expand Down
42 changes: 34 additions & 8 deletions doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,38 @@ SmartDashboard

``SmartDashboard`` is an add-on to SmartSim that provides a dashboard to help users understand
and monitor their SmartSim experiments in a visual way. Configuration, status, and logs
are available for all launched entities within an experiment for easy inspection.
are available for all launched entities within an experiment for easy inspection,
along with memory and client data per shard for launched orchestrators.

A ``Telemetry Monitor`` is a background process that is launched along with the experiment
that produces the data displayed by SmartDashboard. The ``Telemetry Monitor`` can be disabled by
adding ``export SMARTSIM_TELEMETRY_ENABLE=0`` as an environment variable. When disabled, SmartDashboard
will not display any data. To re-enable, set the ``SMARTSIM_TELEMETRY_ENABLE`` environment variable to ``1``
with ``export SMARTSIM_TELEMETRY_ENABLE=1``.
A ``Telemetry Monitor`` is a background process that is launched alongside the experiment.
It is responsible for generating the data displayed by SmartDashboard. The ``Telemetry Monitor`` can be disabled globally by
adding ``export SMARTSIM_FLAG_TELEMETRY=0`` as an environment variable. When disabled, SmartDashboard
will not display entity status data. To re-enable, set the ``SMARTSIM_FLAG_TELEMETRY`` environment variable to ``1``
with ``export SMARTSIM_FLAG_TELEMETRY=1``. For workflows involving multiple experiments, SmartSim provides the attributes
``Experiment.telemetry.enable`` and ``Experiment.telemetry.disable`` to manage the enabling or disabling of telemetry on a per-experiment basis.

Experiment metadata is also stored in the ``.smartsim`` directory, a hidden folder for internal api use and used by the dashboard.
Deletion of the experiment folder will remove all experiment metadata.
``Orchestrator`` memory and client data can be collected by enabling database telemetry. To do so, add ``Orchestrator.telemetry.enable``
after creating an ``Orchestrator`` within the driver script. Database telemetry is enabled per ``Orchestrator``, so if there are multiple
``Orchestrators`` launched, they will each need to be enabled separately in the driver script.

.. code-block:: python
# enabling telemetry example
from smartsim import Experiment
exp = Experiment("experiment", launcher="auto")
exp.telemetry.enable()
db = exp.create_database(db_nodes=3)
db.telemetry.enable()
exp.start(db, block=True)
exp.stop(db)
Experiment metadata is stored in the ``.smartsim`` directory, a hidden folder used by the internal api and accessed by the dashboard.
This folder can be found within the created experiment directory.
Deletion of the experiment folder will remove all associated metadata.


Installation
Expand Down Expand Up @@ -135,4 +156,9 @@ configuration and status information, as well as logs per shard for a selected o
Finally, in the ``Ensembles`` section, select an ensemble to see its status and configuration.
Then select any of its members to see its status, configuration, and logs.

``Database Telemetry:`` This tab provides additional details about ``Orchestrators``.
The ``Orchestrator Summary`` section shows configuration and status information. The ``Memory``
section provides memory usage data per shard within the ``Orchestrator``. The ``Clients``
section displays client data per shard within the ``Orchestrator``.

``Help:`` This tab links to SmartSim documentation and provides a SmartSim contact for support.
Loading

0 comments on commit 69ef170

Please sign in to comment.