-
Notifications
You must be signed in to change notification settings - Fork 24
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
Communicate truncated 64 bit segmentation #4598
Conversation
* not working as intended as the segmentation is 32 bit for the frontend
…egmentation layer
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.
Backend LGTM and works for me :)
…n-for-id-mismatch-in-64-bit-segmemtations
…unicate-truncated-uint64
@daniel-wer Would you please check the frontend part? |
@@ -433,10 +433,14 @@ function setupLayerForVolumeTracing( | |||
const fallbackLayerIndex = _.findIndex(layers, layer => layer.name === tracing.fallbackLayer); | |||
const fallbackLayer = layers[fallbackLayerIndex]; | |||
const boundaries = getBoundaries(dataset); | |||
// The frontend does not support uint64 data. Thus if the segmentation is uint64 | |||
// we treat it as uint32 and save that it originally has the element class uint64. | |||
const isUint64Segmentation = tracing.elementClass === "uint64"; |
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.
What is tracing.elementClass
referring to, the elementClass
or the originalElementClass
?
The backend converts an elementClass
of uint64
to uint32
, so the elementClass
value should never be uint64
.
This is how we achieved the original cheap uint64 support, see #4233. If you want to, the backend can send the real elementClass
to the frontend, which would mean we could rid of the originalElementClass
in the backend.
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 is in case of volume tracings (as opposed to view mode). the tracing still sends the uint64.
but yeah, feel free to unify this in whichever way seems best :)
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.
I think we need to be extra careful before allowing 64 bit volume tracings, as they will probably mix 32 bit and 64 bit data. But this PR mainly deals with the view mode, right @MichaelBuessemeyer ?
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.
- I got no mail notification that youri posted this concern 😕.
But this PR mainly deals with the view mode, right @MichaelBuessemeyer ?
No it doesn't This PR also enables 64-bit volume tracings in the frontend. If we do not what this behaviour (and that's what I think is your opinion) we just have to remove the changes in lines 436-438, 442
. Then the user will get a warning upon opening a volume tracing.
@youri: When the user creates a volume tracing the backend creates an empty tracing (maybe including a fallback layer). At this point the backend seems inconsistent, because trying to create a volume tracing on a dataset with a uint64-bit segmentation layer will set the elementClass
of the initial tracing to elementClass
. At least that's what I remember and why I needed to add the lines 436-438, 442
.
According to the suggestion to always send the 64-bit element class as the property elementClass
and getting rid of originalElementClass
: This should be possible :).
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.
I see, thank you for your reply!
We should extensively test the 64 bit volume tracing, especially with how fallback layer data is incorporated into the tracing, and if this works with #4602
But yeah, let’s try it :)
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.
I just had a conversation with Youri and we decided it would be preferrable not to allow 64-bit volume tracings yet.
While the trouble with their data being in 32 bit and the fallback buckets being 64 bit is invisible in the wK frontend, since the fallback buckets will be truncated to 32 bit, the data will not actually be compatible, it will not actually be clear which ID should belong to which cell.
Additionally, saving 32 bit data labeled as 64 bit data can lead to incompatibilities in case the frontend in some future version using some future javascript features actually produces 64 bit data. Then our implicit knowledge becomes ambiguous.
Since no user has yet wished for volume tracings with 64 bit fallback layer, and this PR was originally only about the user notification about truncated data, please remove the changes you mentioned, @MichaelBuessemeyer , so that the user can not trace on 64 bit volume tracings. Additionally, @youri-k , please add an check in the back-end side creation of volume tracings, so that 64 bit volume tracings can not be created.
…municate-truncated-uint64
…municate-truncated-uint64
@daniel-wer Could you please review the frontend part of this PR? I added the optional Just saving the The conversion of type |
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.
@MichaelBuessemeyer Frontend looks good to me, I added a couple of suggestions. I couldn't test yet, but will report back after the CI run was successful :)
@@ -295,6 +295,24 @@ function initializeDataset( | |||
dataSet: dataset.dataSource.id.name, | |||
}); | |||
|
|||
// Here we add the originalElementClass property to the segmentation layer if it exists. |
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.
Might be a matter of personal preference, but I think usually comments should short and concise, so Add the original ...
instead of Here we add the original ...
. Please drop the we
from the other comments as well. Apart from that, the comments are written very well 👍
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.
Ok, thanks for that feedback. I'll pay attention to that 🙂
@@ -434,9 +452,13 @@ function setupLayerForVolumeTracing( | |||
const fallbackLayer = layers[fallbackLayerIndex]; | |||
const boundaries = getBoundaries(dataset); | |||
|
|||
// We do not adjust the elementClass here if it is uint64, because uint64 volume tracings are not supported. | |||
// Not adjusting the elementClass will cause the later check for supported layer element classes to fail | |||
// if the segmentation of type uint64. |
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.
// if the segmentation of type uint64. | |
// if the segmentation is of type uint64. |
const tracingLayer = { | ||
name: tracing.id, | ||
elementClass: tracing.elementClass, | ||
originalElementClass: tracing.elementClass, |
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.
Does the originalElementClass
need to be set here at all? In the type definition it's declared as optional.
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.
Thanks, you are correct. I'll revert the changes here 👍
<React.Fragment> | ||
{title}{" "} | ||
<Tooltip title={message["tracing.uint64_segmentation_warning"]}> | ||
<Icon type="info-circle" style={{ color: "rgb(255, 155, 85)" }} /> |
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.
Maybe use warning
as the type instead. That would better fit with the color and the intention of this message to warn the user that the displayed ids may not be correct.
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.
Sure, that makes sense 🤯
Testing went well 👍 @youri-k How much effort would it be to make this error message a little more helpful and display the actual error message concerning the uint64 layer instead of the generic one in the top level? It's fine if it's not feasible, I just wanted to check :) |
I think it should be relatively easy to move the “because you are not a memeber of a team that has access” down into the debug info chain (so that it only shows when it is actually true). |
I'll do the suggested changes and I'm also in favor of renaming the expand button. |
…municate-truncated-uint64
@daniel-wer Could you please check the few changes I pushed? |
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.
@MichaelBuessemeyer Frontend, LGTM 👍
This should be good to go, or @MichaelBuessemeyer? |
If the backend part is also approved then sure 🎉 |
@youri-k Is the backend part also approved? |
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
[ ] Updated (unreleased) migration guide if applicable[ ] Updated documentation if applicable[ ] Adapted wk-connect if datastore API changes[ ] Needs datastore update after deployment