jolly-florist-66728
10/14/2024, 6:21 PMtags
field under task metadata
section in our flyte console, but I don't seem to find any code reference to update it 🤔 The closest is here while again, don't think it is somehow exposed to workflow or task
# Answer
Flyte currently does not support updating task metadata tags directly through the Flyte SDK or Flyte Remote client. The tags
field in the TaskMetadata
struct is not exposed for direct manipulation via the Flyte SDK or Flyte Remote client.
However, you can use labels and annotations to achieve similar functionality. Labels and annotations can be added to tasks and workflows during their creation. Here is an example of how to add labels and annotations to a task using Flyte's Python SDK:
from flytekit import task, workflow, Labels, Annotations
@task(labels=Labels({"mylabel": "myvalue"}), annotations=Annotations({"myannotation": "myvalue"}))
def my_task(x: int) -> int:
return x + 1
@workflow
def my_workflow(x: int) -> int:
return my_task(x=x)
For more details, refer to the Flyte documentation on workflow labels and annotations.
Would you like more details on how to use labels and annotations or any other aspect of Flyte?
Sources:
- https://github.com/flyteorg/flyte/issues/5162
- https://github.com/flyteorg/flyte/issues/4876
Slack Link
https://.slack.com/archives/CP2HDHKE1/p1728930063.217569 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.