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

Tkakar/cat 673 add epics support #3586

Merged
merged 15 commits into from
Nov 12, 2024
Merged

Conversation

tkakar
Copy link
Collaborator

@tkakar tkakar commented Oct 30, 2024

Summary

This PR adds support to visualize EPIC segmentation masks in the unified views.

Design Documentation/Original Tickets

CAT-673

Testing

Manually tested for test datasets on Dev with visualizations

Screenshots/Video

Screenshot 2024-10-30 at 8 20 52 AM

Checklist

  • Code follows the project's coding standards
    • Lint checks pass locally
    • New CHANGELOG-your-feature-name-here.md is present in the root directory, describing the change(s) in full sentences.
  • Unit tests covering the new feature have been added
  • All existing tests pass
  • Any relevant documentation in JIRA/Confluence has been updated to reflect the new feature
  • Any new functionalities have appropriate analytics functionalities added

Additional Notes

Please specify any additional information or context relevant to this PR.

Copy link
Collaborator

@john-conroy john-conroy left a comment

Choose a reason for hiding this comment

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

Great! A few comments.

max_modified_date = None
max_date_descendant = None
for descendant in descendants:
dec_entity = client.get_entity(descendant)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should consolidate this into a single request using get_entities.

dec_entity = client.get_entity(descendant)
# TODO: Until we have better entity qualifier
if dec_entity.get('creation_action').lower() == 'central process' and len(
dec_entity.get('files')) > 0 and dec_entity.get('status').lower() != 'error':
Copy link
Collaborator

Choose a reason for hiding this comment

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

Historically we've lifted entities that are in QA or Published, should we continue that logic here?

Comment on lines 146 to 148
mapped_last_modified_timestamp = datetime.strptime(
dec_entity.get('mapped_last_modified_timestamp'), "%Y-%m-%d %H:%M:%S")
if max_modified_date is None or mapped_last_modified_timestamp > max_modified_date:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I likely prompted using mapped_last_modified_timestamp in standup, but we can use last_modified_timestamp which is an int.

Comment on lines 122 to 124
if parent is None:
ancestors = entity.get('immediate_ancestors')
if len(ancestors) > 0 and ancestors[0]['entity_type'] == 'Dataset':
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be preferable to use immediate_ancestors_ids and make a request to get the ancestor entities. immediate_ancestors is somewhat deprecated as it greatly increases the ES document size. We could have the query only return datasets.

@tkakar
Copy link
Collaborator Author

tkakar commented Oct 30, 2024

@john-conroy thanks for the suggestions. Will work on implementing them.

NickAkhmetov
NickAkhmetov previously approved these changes Nov 12, 2024
Copy link
Collaborator

@NickAkhmetov NickAkhmetov left a comment

Choose a reason for hiding this comment

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

Fantastic work! Only noticed one minor issue, i.e. a 401 warning popping up for those same zarr stores.

const handleWarning = useCallback(
(message: string) => {
// Suppress the "Node not found" message that appears when no zarr file was found
if (message.includes('Node not found')) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm seeing a Unexpected response status 401 warning from what appears to be the same zarr issue, based on the network logs:
image
image

I think we could add that as another message to match against.

Copy link
Collaborator

@NickAkhmetov NickAkhmetov left a comment

Choose a reason for hiding this comment

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

Nicely done!

@tkakar tkakar merged commit e094be7 into main Nov 12, 2024
8 checks passed
@tkakar tkakar deleted the tkakar/cat-673-add-epics-support branch November 12, 2024 21:45
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.

3 participants