Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d0d3b75
🚧 Started Grids functionality
kzscisoft Aug 15, 2025
f6651d9
🚧 Finished concept draft of grids API
kzscisoft Aug 18, 2025
616a5f2
🐛 Remove unneeded class method decorator
kzscisoft Aug 18, 2025
e124370
🧪 Add tests and fixed a few grid related bugs
kzscisoft Aug 18, 2025
974b5d9
⚡️ Switch to new endpoint for grid posting
kzscisoft Aug 19, 2025
b924df7
✨ Fixed and completed online version of grid metrics
kzscisoft Aug 19, 2025
e3e3f5d
Merge branch 'dev' into kzscisoft/833-add-support-for-multidimensiona…
kzscisoft Aug 19, 2025
dc501b6
📝 Updated CHANGELOG
kzscisoft Aug 19, 2025
0d436f8
🐛 Fix numpy requirement for grid definition and added default grid
kzscisoft Aug 19, 2025
e261afe
🚧 Working on offline multidimensional metrics
kzscisoft Aug 22, 2025
495977c
🐛 Fix validation display bug
kzscisoft Aug 29, 2025
c47cc5b
👽️ Modify Grid to match new endpoints
kzscisoft Aug 29, 2025
6429161
👽️ Updated user level API
kzscisoft Aug 29, 2025
90cc83f
🐛 Ensure commit only performed if staged metrics
kzscisoft Aug 29, 2025
334f8c7
✨ Fix Grid offline mode
kzscisoft Aug 29, 2025
517f865
Merge branch 'dev' into kzscisoft/833-add-support-for-multidimensiona…
kzscisoft Aug 29, 2025
2053b81
🐛 Fixed bugs raised in MR
kzscisoft Sep 1, 2025
9cea17c
🐛 Fixed wrong function in grids reconnect
kzscisoft Sep 2, 2025
76e7ad5
🚧 Working on fixing offline grid metrics
kzscisoft Sep 2, 2025
1e9adc6
Merge branch 'dev' into kzscisoft/833-add-support-for-multidimensiona…
kzscisoft Sep 2, 2025
772969d
Fixed offline multi-d
wk9874 Sep 9, 2025
5cb6c4e
Fixed tests
wk9874 Sep 10, 2025
7babbec
Addressed PR comments
wk9874 Sep 15, 2025
af95cc5
Merge pull request #855 from simvue-io/wk9874/multi_d_offline_fix
kzscisoft Sep 15, 2025
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.
- Improves checks on `offline.cache` directory specification in config file.

## [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",
]
32 changes: 26 additions & 6 deletions simvue/api/objects/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,22 @@ 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,
expected_type: type = dict,
**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 All @@ -473,12 +485,18 @@ def _get_all_objects(
for response in get_paginated(
_url, headers=_class_instance._headers, offset=offset, count=count, **kwargs
):
yield get_json_from_response(
_generator = get_json_from_response(
response=response,
expected_status=[http.HTTPStatus.OK],
scenario=f"Retrieval of {_label}s",
expected_type=expected_type,
) # type: ignore

if expected_type is dict:
yield _generator
else:
yield from _generator

def read_only(self, is_read_only: bool) -> None:
"""Set whether this object is in read only state.

Expand Down Expand Up @@ -552,14 +570,16 @@ def url(self) -> URL | None:
"""
return None if self._identifier is None else self._base_url / self._identifier

def _post(self, is_json: bool = True, **kwargs) -> dict[str, typing.Any]:
def _post(
self, *, is_json: bool = True, data: list | dict | None = None, **kwargs
) -> dict[str, typing.Any]:
if not is_json:
kwargs = msgpack.packb(kwargs, use_bin_type=True)
kwargs = msgpack.packb(data or kwargs, use_bin_type=True)
_response = sv_post(
url=f"{self._base_url}",
headers=self._headers | {"Content-Type": "application/msgpack"},
params=self._params,
data=kwargs,
data=data or kwargs,
is_json=is_json,
)

Expand Down
Loading