-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[WIP] 8134 Add unit test for realtime inference #8146
base: dev
Are you sure you want to change the base?
Conversation
merge master
merge master
merge master
merge master
merge master
merge master
merge master
Signed-off-by: Nic Ma <[email protected]>
Hi @Nic-Ma, we haven't had time to discuss the ideas around realtime/streaming inference yet due to MICCAI, but I feel we should look into doing this with specialised versions of datasets and transforms to represent streams of incoming and outgoing items. This would implement streaming without modifying existing workflows if we can get it performant. |
Hi @ericspod , Yes, I totally agree with you, I was thinking both the streaming way and repeatedly calling way. This PR is just a draft implementation for discussion, could you please help also write draft code for your idea and let's discuss later? Thanks in advance. |
Signed-off-by: Nic Ma <[email protected]>
Signed-off-by: Nic Ma <[email protected]>
for more information, see https://pre-commit.ci
@@ -192,6 +192,16 @@ def get_resolved_content(self, id: str, **kwargs: Any) -> ConfigExpression | str | |||
""" | |||
return self._resolve_one_item(id=id, **kwargs) | |||
|
|||
def remove_resolved_content(self, id: str) -> Any | None: |
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.
This may be a good addition regardless of the intent here.
for i in range(len(self.parser[id])): | ||
sub_id = f"{id}{ID_SEP_KEY}{i}" | ||
ret.append(self.parser.get_parsed_content(sub_id, **kwargs)) | ||
self.parser.ref_resolver.remove_resolved_content(sub_id) |
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.
This prevents keeping large objects created by the expression evaluation which aren't used anymore, so might be an optimisation in some cases.
Fixes #8134 .
Description
This PR added unit test to cover the realtime inference with bundles.
And updated
BundleWorkflow
to support cyclically calling therun
function with all components instantiated.Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.