Skip to content

[cards] support writing metadata #2452

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

valayDave
Copy link
Collaborator

  • cards can now have metadata about important information created for them like ids/types/ other info in decorators
  • This also allows us for book-keeping the attempts as cards are created.
  • We write the metadata in the cli so we put something stateful on top to ensure we don't end up writing the metadata multiple times.
  • Overall, since cards are being written async, we can only ensure best effort registration from metaflow side since we don't necessarily block when we save cards.
  • This commit implementation will save metadata on a per-card basis. Instead of updating all card metadata at once. We do this because we will otherwise have multiple copies of the metadata in the database.
  • The metadata writing is optional and can be disabled via the config variable.
  • This addition also allows us to update the metaflow-service code for filtering cards based on attempt basis.

- Allow ensuring that cards can now have metadata about important information created for them like ids/types/ other info in decorators
- This also allows us for book-keeping the attempts as cards are created.
- We write the metadata in the cli so we need to put something stateful on top to enure we end up writing the metadata.
- Overall, since cards are being written async, we can only ensure best effort registration of metaflow. We dont necessarily block when we save cards.
- This commit implementation will save metadata on a per-card basis. Instead of updating all card metadata at once.
@valayDave valayDave force-pushed the valay-oss/cards-with-metadata branch from fc141fc to ee0c106 Compare June 13, 2025 03:05
@@ -218,6 +218,8 @@

RUNTIME_CARD_RENDER_INTERVAL = from_conf("RUNTIME_CARD_RENDER_INTERVAL", 60)

CARD_WRITE_TO_METADATA = from_conf("CARD_WRITE_TO_METADATA", True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to offer it as a top level config? we can start writing metadata always in the context of flows.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tuulos recommended that we keep the writing optional since it was not there earlier. Personally don't have a problem with removing it since the UI service might still use the same logic that retrieves stuff from the datastore.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We discussed this in the weekly chat that it would be easy to keep things simple and consistent going forward.

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.

2 participants