Skip to content

Commit

Permalink
Extend the live experiment plot to include image (#26)
Browse files Browse the repository at this point in the history
* Extend the live experiment plot to include image

Relates to iterative/studio#5485

Make data and image exclusive

* Convert the image field to array of dictionary

* Revert "Convert the image field to array of dictionary"

This reverts commit 45c892c.
  • Loading branch information
amritghimire authored Apr 12, 2023
1 parent 485b2d8 commit fd9aac6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/dvc_studio_client/schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from voluptuous import All, Any, Lower, Match, Required, Schema
from voluptuous import All, Any, Exclusive, Lower, Match, Required, Schema


def Choices(*choices):
Expand Down Expand Up @@ -32,7 +32,14 @@ def Choices(*choices):
"data": BASE_SCHEMA.extend(
{
Required("step"): int,
"plots": {str: {"data": [dict], "props": dict, "error": ERROR_SCHEMA}},
"plots": {
str: {
Exclusive("data", "data"): [dict],
"props": dict,
"error": ERROR_SCHEMA,
Exclusive("image", "data"): str,
}
},
}
),
"done": BASE_SCHEMA.extend(
Expand Down

0 comments on commit fd9aac6

Please sign in to comment.