-
Notifications
You must be signed in to change notification settings - Fork 317
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
[feat] Aim revamped SDK #2661
[feat] Aim revamped SDK #2661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments/thoughts for discussion later on, overall looks great!
exists = False | ||
|
||
if self._container._is_readonly and not exists: | ||
raise ValueError('Cannot create sequence from a readonly container.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should have been a key error?
for name in self._sequence_tree.subtree(ctx_idx).keys(): | ||
yield self._sequence_cls(self._container, name=name, context=ctx_idx) | ||
|
||
def __getitem__(self, item: Union[str, Tuple[str, Dict]]) -> Sequence: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general does it make sense to do some write operations on a __getitem__
method? Aren't there any alternatives to this design?
break | ||
yield hash_, name, context | ||
|
||
def filter(self, expr: str) -> ABCSequenceCollection['Sequence']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to allow filtering at all on a limited collection?
step = self._info.next_step | ||
|
||
if self._info.empty: | ||
self._tree[KeyNames.INFO_PREFIX, 'creation_time'] = utc_timestamp() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add also step/track call counts here as well
if step is None: | ||
step = self._info.next_step | ||
|
||
if self._info.empty: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add some logic for per type sequence count to use later for stats
resolves #2689 |
Implementation of the Aim Python SDK.
Provides clean interfaces for working with the metadata concepts, such as Container, Sequence, Object, etc.
Core components
aim.sdk.core.interfaces
; declaration of the interfaces (pure abstract)aim.sdk.core
; implementation ofContainer
,Sequence
,Object
and collections of them based on theaimrocks
storage backend andTreeView
abstractionaim.sdk.core.type_utils
; implementation of Aim type sytem utilitiesaim.sdk.core.repo
; implementation of a wrapper class for theaim.Repo
class, with abstractions for supporting different types of Containers/Sequences.Web APIs
api/objects/search
; unified API for querying data from Aim (including types non-compatible with the new SDK, such asaim.Run
,aim.Metric
,aim.Images
)