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

Assertion fails in unpack_helper() #3297

Closed
qzed opened this issue Mar 3, 2025 ยท 0 comments ยท Fixed by #3298
Closed

Assertion fails in unpack_helper() #3297

qzed opened this issue Mar 3, 2025 ยท 0 comments ยท Fixed by #3298
Labels
help wanted Extra attention is needed type / bug Issue type: something isn't working

Comments

@qzed
Copy link
Contributor

qzed commented Mar 3, 2025

๐Ÿ› Bug

When remote logging, resuming/continuing a run occasionally fails, triggering an assertion. See log/trace excerpt below for details.

Trace ``` โ”‚ โ”‚ โ”‚ /home/luz/micromamba/envs/bosch-tracking-cu118/lib/python3.11/site-packages/aim/sdk/run.py:864 in __init__ โ”‚ โ”‚ โ”‚ โ”‚ 861 โ”‚ โ”‚ log_system_params: Optional[bool] = False, โ”‚ โ”‚ 862 โ”‚ โ”‚ capture_terminal_logs: Optional[bool] = True, โ”‚ โ”‚ 863 โ”‚ ): โ”‚ โ”‚ โฑ 864 โ”‚ โ”‚ super().__init__(run_hash, repo=repo, read_only=read_only, experiment=experiment โ”‚ โ”‚ 865 โ”‚ โ”‚ โ”‚ โ”‚ 866 โ”‚ โ”‚ self._system_resource_tracker: ResourceTracker = None โ”‚ โ”‚ 867 โ”‚ โ”‚ if not read_only: โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ capture_terminal_logs = True โ”‚ โ”‚ โ”‚ โ”‚ experiment = None โ”‚ โ”‚ โ”‚ โ”‚ force_resume = True โ”‚ โ”‚ โ”‚ โ”‚ log_system_params = False โ”‚ โ”‚ โ”‚ โ”‚ read_only = False โ”‚ โ”‚ โ”‚ โ”‚ repo = 'aim://10.4.28.205:53800' โ”‚ โ”‚ โ”‚ โ”‚ run_hash = '147ff01f895d4e828fceb6f0' โ”‚ โ”‚ โ”‚ โ”‚ self = > โ”‚ โ”‚ โ”‚ โ”‚ system_tracking_interval = 10 โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/luz/micromamba/envs/bosch-tracking-cu118/lib/python3.11/site-packages/aim/sdk/run.py:280 in __init__ โ”‚ โ”‚ โ”‚ โ”‚ 277 โ”‚ โ”‚ if not read_only: โ”‚ โ”‚ 278 โ”‚ โ”‚ โ”‚ logger.debug(f'Opening Run {self.hash} in write mode') โ”‚ โ”‚ 279 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โฑ 280 โ”‚ โ”‚ โ”‚ if self.check_metrics_version(): โ”‚ โ”‚ 281 โ”‚ โ”‚ โ”‚ โ”‚ if self.repo.is_remote_repo: โ”‚ โ”‚ 282 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ logger.warning( โ”‚ โ”‚ 283 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ f'Cannot track Run with remote repo {self.repo.path}. Please upg โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ experiment = None โ”‚ โ”‚ โ”‚ โ”‚ force_resume = True โ”‚ โ”‚ โ”‚ โ”‚ read_only = False โ”‚ โ”‚ โ”‚ โ”‚ repo = 'aim://10.4.28.205:53800' โ”‚ โ”‚ โ”‚ โ”‚ run_hash = '147ff01f895d4e828fceb6f0' โ”‚ โ”‚ โ”‚ โ”‚ self = > โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/luz/micromamba/envs/bosch-tracking-cu118/lib/python3.11/site-packages/aim/sdk/base_run.py:81 in โ”‚ โ”‚ check_metrics_version โ”‚ โ”‚ โ”‚ โ”‚ 78 โ”‚ โ”‚ โ”‚ 79 โ”‚ def check_metrics_version(self) -> bool: โ”‚ โ”‚ 80 โ”‚ โ”‚ metric_dtypes = ('float', 'float64', 'int') โ”‚ โ”‚ โฑ 81 โ”‚ โ”‚ traces_tree = self.meta_run_tree.get('traces', {}) โ”‚ โ”‚ 82 โ”‚ โ”‚ โ”‚ โ”‚ 83 โ”‚ โ”‚ v1_metric_found = False โ”‚ โ”‚ 84 โ”‚ โ”‚ for ctx_metadata in traces_tree.values(): โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ metric_dtypes = ('float', 'float64', 'int') โ”‚ โ”‚ โ”‚ โ”‚ self = > โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ in aim.storage.treeview.TreeView.get:32 โ”‚ โ”‚ โ”‚ โ”‚ in aim.storage.treeview.TreeView.__getitem__:28 โ”‚ โ”‚ โ”‚ โ”‚ in aim.storage.treeview.TreeView.collect:23 โ”‚ โ”‚ โ”‚ โ”‚ /home/luz/micromamba/envs/bosch-tracking-cu118/lib/python3.11/site-packages/aim/storage/treeviewproxy.py:154 in โ”‚ โ”‚ collect โ”‚ โ”‚ โ”‚ โ”‚ 151 โ”‚ def collect( โ”‚ โ”‚ 152 โ”‚ โ”‚ self, path: Union[AimObjectKey, AimObjectPath] = (), strict: bool = True, resolv โ”‚ โ”‚ 153 โ”‚ ) -> AimObject: โ”‚ โ”‚ โฑ 154 โ”‚ โ”‚ return self.tree.collect(self.absolute_path(path), strict, resolve_objects) โ”‚ โ”‚ 155 โ”‚ โ”‚ โ”‚ 156 โ”‚ def __delitem__(self, path: Union[AimObjectKey, AimObjectPath]): โ”‚ โ”‚ 157 โ”‚ โ”‚ del self.tree[self.absolute_path(path)] โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ path = 'traces' โ”‚ โ”‚ โ”‚ โ”‚ resolve_objects = False โ”‚ โ”‚ โ”‚ โ”‚ self = โ”‚ โ”‚ โ”‚ โ”‚ strict = True โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/luz/micromamba/envs/bosch-tracking-cu118/lib/python3.11/site-packages/aim/storage/treeviewproxy.py:73 in โ”‚ โ”‚ collect โ”‚ โ”‚ โ”‚ โ”‚ 70 โ”‚ def collect( โ”‚ โ”‚ 71 โ”‚ โ”‚ self, path: Union[AimObjectKey, AimObjectPath] = (), strict: bool = True, resolv โ”‚ โ”‚ 72 โ”‚ ) -> AimObject: โ”‚ โ”‚ โฑ 73 โ”‚ โ”‚ return self._rpc_client.run_instruction(self._hash, self._handler, 'collect', (p โ”‚ โ”‚ 74 โ”‚ โ”‚ โ”‚ 75 โ”‚ def __delitem__(self, path: Union[AimObjectKey, AimObjectPath]): โ”‚ โ”‚ 76 โ”‚ โ”‚ self._rpc_client.run_instruction(self._hash, self._handler, '__delitem__', (path โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ path = ('meta', 'chunks', '147ff01f895d4e828fceb6f0', 'traces') โ”‚ โ”‚ โ”‚ โ”‚ resolve_objects = False โ”‚ โ”‚ โ”‚ โ”‚ self = โ”‚ โ”‚ โ”‚ โ”‚ strict = True โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/luz/micromamba/envs/bosch-tracking-cu118/lib/python3.11/site-packages/aim/ext/transport/client.py:253 in โ”‚ โ”‚ run_instruction โ”‚ โ”‚ โ”‚ โ”‚ 250 โ”‚ โ”‚ โ”‚ ) โ”‚ โ”‚ 251 โ”‚ โ”‚ โ”‚ return โ”‚ โ”‚ 252 โ”‚ โ”‚ โ”‚ โ”‚ โฑ 253 โ”‚ โ”‚ return self._run_read_instructions(queue_id, resource, method, args) โ”‚ โ”‚ 254 โ”‚ โ”‚ โ”‚ 255 โ”‚ def _run_read_instructions(self, queue_id, resource, method, args): โ”‚ โ”‚ 256 โ”‚ โ”‚ endpoint = f'{self._http_protocol}{self._tracking_endpoint}/{self.uri}/read-inst โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ args = (('meta', 'chunks', '147ff01f895d4e828fceb6f0', 'traces'), True, False) โ”‚ โ”‚ โ”‚ โ”‚ is_write_only = False โ”‚ โ”‚ โ”‚ โ”‚ method = 'collect' โ”‚ โ”‚ โ”‚ โ”‚ queue_id = '147ff01f895d4e828fceb6f0' โ”‚ โ”‚ โ”‚ โ”‚ resource = '5519f717-f1b9-4def-9bed-53307197ffa7' โ”‚ โ”‚ โ”‚ โ”‚ self = โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/luz/micromamba/envs/bosch-tracking-cu118/lib/python3.11/site-packages/aim/ext/transport/client.py:273 in โ”‚ โ”‚ _run_read_instructions โ”‚ โ”‚ โ”‚ โ”‚ 270 โ”‚ โ”‚ โ”‚ โ”‚ 271 โ”‚ โ”‚ if response.status_code == 400: โ”‚ โ”‚ 272 โ”‚ โ”‚ โ”‚ raise_exception(response.json().get('exception')) โ”‚ โ”‚ โฑ 273 โ”‚ โ”‚ return decode_tree(unpack_stream(response.iter_content(chunk_size=None))) โ”‚ โ”‚ 274 โ”‚ โ”‚ โ”‚ 275 โ”‚ def _run_write_instructions(self, instructions: [Tuple[bytes, bytes]]): โ”‚ โ”‚ 276 โ”‚ โ”‚ msg = pack_args(iter(instructions)) โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ args = (('meta', 'chunks', '147ff01f895d4e828fceb6f0', 'traces'), True, False) โ”‚ โ”‚ โ”‚ โ”‚ endpoint = 'http://10.4.28.205:53800/tracking/74e8733e-ebb5-4c36-a6af-01291cf1f782/read-inst'+8 โ”‚ โ”‚ โ”‚ โ”‚ method = 'collect' โ”‚ โ”‚ โ”‚ โ”‚ queue_id = '147ff01f895d4e828fceb6f0' โ”‚ โ”‚ โ”‚ โ”‚ request_data = { โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'resource_handler': '5519f717-f1b9-4def-9bed-53307197ffa7', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'method_name': 'collect', โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 'args': โ”‚ โ”‚ โ”‚ โ”‚ 'AAAAAAABAAAABgoAAAD+AAAAAAAAAAD+AAEAAAAGFAAAAP4AAAAAAAAAAP7+AAAAAAAAAAD+AAUAAAAE'+232 โ”‚ โ”‚ โ”‚ โ”‚ } โ”‚ โ”‚ โ”‚ โ”‚ resource = '5519f717-f1b9-4def-9bed-53307197ffa7' โ”‚ โ”‚ โ”‚ โ”‚ response = โ”‚ โ”‚ โ”‚ โ”‚ self = โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ in aim.storage.treeutils.decode_tree:270 โ”‚ โ”‚ โ”‚ โ”‚ in aim.storage.treeutils.fold_tree:95 โ”‚ โ”‚ โ”‚ โ”‚ in iter_fold_tree:126 โ”‚ โ”‚ โ”‚ โ”‚ in aim.storage.treeutils.DecodePathsVals.__next__:201 โ”‚ โ”‚ โ”‚ โ”‚ in aim.storage.treeutils.DecodePathsVals._next:214 โ”‚ โ”‚ โ”‚ โ”‚ /home/luz/micromamba/envs/bosch-tracking-cu118/lib/python3.11/site-packages/aim/ext/transport/message_utils.py:63 in โ”‚ โ”‚ unpack_stream โ”‚ โ”‚ โ”‚ โ”‚ 60 โ”‚ โ”‚ 61 def unpack_stream(stream) -> Tuple[bytes, bytes]: โ”‚ โ”‚ 62 โ”‚ for msg in stream: โ”‚ โ”‚ โฑ 63 โ”‚ โ”‚ yield from unpack_helper(msg) โ”‚ โ”‚ 64 โ”‚ โ”‚ 65 โ”‚ โ”‚ 66 def raise_exception(server_exception): โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ msg = b'#\x00\x00\x00\xfeH\x07\xfcy\xc3\xdf\xaf5\xfeamotp/bicycle\xfefirst_step\xfe\x00\t\x00\x00\x00\x02\xbโ€ฆ โ”‚ โ”‚ โ”‚ โ”‚ stream = .generate at 0x7672f91298a0> โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /home/luz/micromamba/envs/bosch-tracking-cu118/lib/python3.11/site-packages/aim/ext/transport/message_utils.py:54 in โ”‚ โ”‚ unpack_helper โ”‚ โ”‚ โ”‚ โ”‚ 51 โ”‚ (is_blob,), tail = struct.unpack('?', tail[:1]), tail[1:] โ”‚ โ”‚ 52 โ”‚ (value_size,), tail = struct.unpack('I', tail[:4]), tail[4:] โ”‚ โ”‚ 53 โ”‚ value, tail = tail[:value_size], tail[value_size:] โ”‚ โ”‚ โฑ 54 โ”‚ assert len(tail) == 0 โ”‚ โ”‚ 55 โ”‚ if is_blob: โ”‚ โ”‚ 56 โ”‚ โ”‚ yield key, BLOB(data=value) โ”‚ โ”‚ 57 โ”‚ else: โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ is_blob = False โ”‚ โ”‚ โ”‚ โ”‚ key = b'\xfeH\x07\xfcy\xc3\xdf\xaf5\xfeamotp/bicycle\xfefirst_step\xfe' โ”‚ โ”‚ โ”‚ โ”‚ key_size = 35 โ”‚ โ”‚ โ”‚ โ”‚ msg = b'#\x00\x00\x00\xfeH\x07\xfcy\xc3\xdf\xaf5\xfeamotp/bicycle\xfefirst_step\xfe\x00\t\x00\x00\x00\x0โ€ฆ โ”‚ โ”‚ โ”‚ โ”‚ tail = b'\x1e\x00\x00\x00\xfeH\x07\xfcy\xc3\xdf\xaf5\xfeamotp/bicycle\xfefirst\xfe\x00\t\x00\x00\x00\x03\โ€ฆ โ”‚ โ”‚ โ”‚ โ”‚ value = b'\x02\xbc\r\x00\x00\x00\x00\x00\x00' โ”‚ โ”‚ โ”‚ โ”‚ value_size = 9 โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ```

It looks like unpack_helper() expects a single message as input. But I think using response.iter_content(chunk_size=None) does not guarantee this, e.g., I think it might receive two or more messages, causing the assertion to fail.

To reproduce

Random. Resume/continue stopped runs in a remote logging setup.

Expected behavior

Runs can be resumed without errors.

Environment

  • Aim Version: v3.27.0
  • Python version: 3.11.9
  • pip version: 24.3.1
  • OS: Linux/Ubuntu 22.04
@qzed qzed added help wanted Extra attention is needed type / bug Issue type: something isn't working labels Mar 3, 2025
qzed added a commit to qzed/aim that referenced this issue Mar 3, 2025
The chunks returned by `response.iter_content(chunk_size=None)` can
contain multiple messages. However, message parsing currently assumes
that these chunks represent individual messages, causing an assertion
failure if this is not the case. Fix this by allowing multiple messages
to be parsed from a single chunk.

Signed-off-by: Maximilian Luz <m@mxnluz.io>
qzed added a commit to qzed/aim that referenced this issue Mar 4, 2025

Verified

This commit was signed with the committerโ€™s verified signature.
qzed Maximilian Luz
The chunks returned by `response.iter_content(chunk_size=None)` can
contain multiple messages. However, message parsing currently assumes
that these chunks represent individual messages, causing an assertion
failure if this is not the case. Fix this by allowing multiple messages
to be parsed from a single chunk.

Signed-off-by: Maximilian Luz <m@mxnluz.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type / bug Issue type: something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant