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

Soft deleted entity ML Model still appears in the UI #6328

Closed
jazzblue opened this issue Nov 1, 2022 · 7 comments
Closed

Soft deleted entity ML Model still appears in the UI #6328

jazzblue opened this issue Nov 1, 2022 · 7 comments
Assignees
Labels
bug Bug report product PR or Issue related to the DataHub UI/UX stale

Comments

@jazzblue
Copy link

jazzblue commented Nov 1, 2022

Describe the bug
After soft deleting mlModel entity still appears on UI despite what the docs say here.

To Reproduce
Steps to reproduce the behavior:

  1. Follow these instructions to spin up Datahub locally (quickstart) and install Python dependencies.
  2. Run the following Python code to create ml modelGroup, mlModel and then soft delete that mlModel:
import datahub.metadata.schema_classes as models
import datahub.emitter.mce_builder as builder
from datahub.emitter.mcp import MetadataChangeProposalWrapper
from datahub.emitter.rest_emitter import DatahubRestEmitter


rest_emitter = DatahubRestEmitter(gms_server="http://localhost:8080")

model_group_urn = builder.make_ml_model_group_urn(
    platform="myplatform", group_name="mymodelgroup", env="PROD"
)


model_urn = builder.make_ml_model_urn(
    platform="myplatform", model_name="mymodel", env="PROD"
)

# Create model group
metadata_change_proposal = MetadataChangeProposalWrapper(
    entityType="mlModelGroup",
    changeType=models.ChangeTypeClass.UPSERT,
    entityUrn=model_group_urn,
    aspectName="mlModelGroupProperties",
    aspect=models.MLModelGroupPropertiesClass(
        description="My model Group",
    ),
)
rest_emitter.emit_mcp(metadata_change_proposal)

# Create model
metadata_change_proposal = MetadataChangeProposalWrapper(
    entityType="mlModel",
    changeType=models.ChangeTypeClass.UPSERT,
    entityUrn=model_urn,
    aspectName="mlModelProperties",
    aspect=models.MLModelPropertiesClass(
        description="My model", groups=[model_group_urn]
    ),
)
rest_emitter.emit_mcp(metadata_change_proposal)

# Delete model
metadata_change_proposal = MetadataChangeProposalWrapper(
    entityType="mlModel",
    changeType=models.ChangeTypeClass.UPSERT,
    entityUrn=model_urn,
    aspectName="status",
    aspect=models.StatusClass(removed=True),
)
rest_emitter.emit_mcp(metadata_change_proposal)
  1. Navigate to the UI: http://localhost:9002/
  2. Drill down: ML Groups -> mymodelgroup
  3. You will see that the ML model we soft deleted above is still shown in the UI.

Expected behavior
The above soft deleted ML model should not be shown in the UI.

Screenshots
Screen Shot 2022-11-01 at 11 51 51 AM

@jazzblue jazzblue added the bug Bug report label Nov 1, 2022
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

@github-actions github-actions bot added the stale label Dec 2, 2022
@laulpogan laulpogan added docs Issues and Improvements to docs product PR or Issue related to the DataHub UI/UX labels Dec 7, 2022
@laulpogan laulpogan self-assigned this Dec 7, 2022
@github-actions github-actions bot removed the stale label Dec 8, 2022
@laulpogan laulpogan removed the docs Issues and Improvements to docs label Dec 12, 2022
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

@github-actions github-actions bot added the stale label Jan 12, 2023
@aditya-radhakrishnan
Copy link
Contributor

Hey @jazzblue sorry for the delayed response here. Were you able to verify that the entity was indeed soft deleted in the database?

@aditya-radhakrishnan
Copy link
Contributor

Ah it looks like we don't support the status aspect on MLModels, thanks for the catch. Let me talk to my colleagues and get back to you on what next steps are!

@aditya-radhakrishnan
Copy link
Contributor

Hey @jazzblue so I realized that our docs are misleading. Soft deletion only means that an entity won't show up in Search or Browse, but its entity page will still be viewable. I created this PR to make that clear #7117

That said, supporting soft deletion for ML models is a different matter, and I will get back to you soon on this!

@aditya-radhakrishnan
Copy link
Contributor

It actually looks like we do support soft deletion for ML models via the legacy snapshot aspects, as shown here https://github.com/datahub-project/datahub/blob/master/metadata-models/src/main/pegasus/com/linkedin/metadata/aspect/MLModelAspect.pdl

Given this, I'm going to close this one out!

@jazzblue
Copy link
Author

jazzblue commented Jan 24, 2023

Hey @jazzblue so I realized that our docs are misleading. Soft deletion only means that an entity won't show up in Search or Browse, but its entity page will still be viewable. I created this PR to make that clear #7117

That said, supporting soft deletion for ML models is a different matter, and I will get back to you soon on this!

@aditya-radhakrishnan I would disagree, soft deleted is deleted and should not show up in the UI. The meaning of soft is that it can be restored, but while it is in soft deleted state it is deleted as far as any user whether API or UI. This should be fixed. I will reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report product PR or Issue related to the DataHub UI/UX stale
Projects
None yet
Development

No branches or pull requests

3 participants