Skip to content

Add support for multidimensional metrics #844

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

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Improves handling of Conda based environments in metadata collection.
- Adds additional options to `Client.get_runs`.
- Added ability to include environment variables within metadata for runs.
- Added new feature allowing users to log tensors as multidimensional metrics after defining a grid.

## [v2.1.2](https://github.com/simvue-io/client/releases/tag/v2.1.2) - 2025-06-25

Expand Down
952 changes: 567 additions & 385 deletions poetry.lock

Large diffs are not rendered by default.

58 changes: 42 additions & 16 deletions simvue/api/objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,54 @@

"""

from .administrator import Tenant as Tenant, User as User
from .administrator import Tenant, User
from .alert import (
Alert as Alert,
EventsAlert as EventsAlert,
MetricsThresholdAlert as MetricsThresholdAlert,
MetricsRangeAlert as MetricsRangeAlert,
UserAlert as UserAlert,
Alert,
EventsAlert,
MetricsThresholdAlert,
MetricsRangeAlert,
UserAlert,
)
from .storage import (
S3Storage as S3Storage,
FileStorage as FileStorage,
Storage as Storage,
S3Storage,
FileStorage,
Storage,
)
from .artifact import (
FileArtifact as FileArtifact,
ObjectArtifact as ObjectArtifact,
Artifact as Artifact,
FileArtifact,
ObjectArtifact,
Artifact,
)

from .stats import Stats as Stats
from .run import Run as Run
from .tag import Tag as Tag
from .folder import Folder as Folder, get_folder_from_path as get_folder_from_path
from .stats import Stats
from .run import Run
from .tag import Tag
from .folder import Folder, get_folder_from_path
from .events import Events as Events
from .metrics import Metrics as Metrics
from .grids import Grid, GridMetrics

__all__ = [
"Grid",
"GridMetrics",
"Metrics",
"Events",
"get_folder_from_path",
"Folder",
"Stats",
"Run",
"Tag",
"Artifact",
"FileArtifact",
"ObjectArtifact",
"S3Storage",
"FileStorage",
"Storage",
"MetricsRangeAlert",
"MetricsThresholdAlert",
"UserAlert",
"EventsAlert",
"Alert",
"Tenant",
"User",
]
15 changes: 13 additions & 2 deletions simvue/api/objects/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,21 @@ def count(cls, **kwargs) -> int:

@classmethod
def _get_all_objects(
cls, offset: int | None, count: int | None, **kwargs
cls,
offset: int | None,
count: int | None,
endpoint: str | None = None,
**kwargs,
) -> typing.Generator[dict, None, None]:
_class_instance = cls(_read_only=True)
_url = f"{_class_instance._base_url}"

# Allow the possibility of paginating a URL that is not the
# main class endpoint
_url = (
f"{_class_instance._user_config.server.url}/{endpoint}"
if endpoint
else f"{_class_instance._base_url}"
)

_label = _class_instance.__class__.__name__.lower()
if _label.endswith("s"):
Expand Down
Loading