Skip to content

Conversation

ieivanov
Copy link

@ieivanov ieivanov commented Aug 6, 2025

Closes #279

TODO:

  • Profile on mantis, we expect this implementation to be slow

@ieivanov
Copy link
Author

@ziw-liu, @tayllatheodoro is actively working on this branch to get a prototype ready for Friday. Can you please keep an eye on it and provide quick feedback where needed? Thanks!

@tayllatheodoro tayllatheodoro marked this pull request as ready for review August 27, 2025 00:56
Copy link
Member

@edyoshikun edyoshikun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to test that this runs.

model_class = getattr(importlib.import_module(module_path), class_name)

# Instantiate model
model = model_class(**init_args).to(x.device).eval()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move it to the model to device and move the tensors to the device.

weights = x.new_zeros((1, 1, Z, 1, 1))

pad = getattr(self, "_predict_pad", None)
if pad is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure if this is needed?

Copy link
Collaborator

@ziw-liu ziw-liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needs a correctness test against the out-of-core implementation.

Comment on lines +566 to +569
if not hasattr(self, "_predict_pad"):
raise RuntimeError(
"Missing _predict_pad; make sure to call `on_predict_start()` before inference."
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This attribute is assigned in __init__, and I don't see a on_predict_start hook implemented for this class.

@ziw-liu ziw-liu mentioned this pull request Sep 9, 2025
@ziw-liu ziw-liu added this to the v0.4.1 milestone Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inference method for 3D virtual staining.

4 participants