Update table

This commit is contained in:
Andras Schmelczer 2022-07-08 08:58:16 +02:00
parent 8c461b0f37
commit d29694b1a2
2 changed files with 4 additions and 7 deletions

View file

@ -18,8 +18,8 @@ def get_traces_table() -> dash_table.DataTable:
"white-space": "normal",
"height": "auto",
"max-height": "300px",
"max-width": "500px",
"overflow": "hidden",
"text-overflow": "ellipsis",
},
style_cell={"padding": "5px"},
style_header={
@ -27,8 +27,5 @@ def get_traces_table() -> dash_table.DataTable:
"font-weight": "bold",
},
merge_duplicate_headers=True,
style_cell_conditional=[
{"if": {"column_id": "output"}, "width": 1500},
],
style_table={"overflow": "auto"},
style_table={"overflow": "auto", "max-height": "80vh"},
)

View file

@ -1,7 +1,7 @@
from pprint import pformat
from typing import Any, Dict, Generic, List, Optional, TypeVar
from pydantic import BaseModel, Extra
from pydantic import Extra
from ..helper import HashableBaseModel
from .model import Model
@ -71,7 +71,7 @@ class Trace(Generic[T], HashableBaseModel):
}
),
**{
k: v.dict() if isinstance(v, BaseModel) else v
k: pformat(v, indent=2, compact=True)
for k, v in self.logged_values.items()
},
"models_flat": self.models_flat,