Skip to content
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

[fix] Use correct value of container.type in query context #3013

Open
wants to merge 1 commit into
base: main-bckp
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
3 changes: 2 additions & 1 deletion src/python/aim/_sdk/query_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from aim._core.storage.proxy import AimObjectProxy
from aim._core.storage.types import SafeNone
from aim._sdk.constants import KeyNames

from typing import TYPE_CHECKING
if TYPE_CHECKING:
Expand Down Expand Up @@ -44,7 +45,7 @@ def hash(self):

@property
def type(self):
return self._cont_tree['info_', 'cont_type']
return self._cont_tree[KeyNames.INFO_PREFIX, KeyNames.CONTAINER_TYPE].split('->')[-1]

def __getattr__(self, item):
return self[item] # fallback to __getitem__
Expand Down
2 changes: 1 addition & 1 deletion src/python/aim/_sdk/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def copy_trees():
for key, val in source_meta_container_attrs_tree_collected.items():
dest_meta_attrs_tree.merge(key, val)

cont_type = source_meta_container_tree_collected[KeyNames.INFO_PREFIX]['cont_type'].split('->')[-1]
cont_type = source_meta_container_tree_collected[KeyNames.INFO_PREFIX][KeyNames.CONTAINER_TYPE].split('->')[-1]

dest_meta_tree[('cont_types_map', container_hash)] = source_meta_tree[('cont_types_map', container_hash)]
dest_meta_tree[('containers', cont_type)] = 1
Expand Down
Loading