Skip to content

Commit

Permalink
model evaluation load_view bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
imanjra committed Dec 18, 2024
1 parent a9ea1c3 commit 68a5210
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,13 @@ export default function Evaluation(props: EvaluationProps) {
].join(" <br>") + "<extra></extra>",
},
]}
onClick={({ points }) => {
const firstPoint = points[0];
loadView("matrix", {
x: firstPoint.x,
y: firstPoint.y,
});
}}
layout={{
yaxis: {
autorange: "reversed",
Expand Down Expand Up @@ -1598,7 +1605,7 @@ function useActiveFilter(evaluation, compareEvaluation) {
const evalKey = evaluation?.info?.key;
const compareKey = compareEvaluation?.info?.key;
const [stages] = useRecoilState(view);
if (stages?.length === 1) {
if (stages?.length >= 1) {
const stage = stages[0];
const { _cls, kwargs } = stage;
if (_cls.endsWith("FilterLabels")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def load_view(self, ctx):
eval_key2 = view_state.get("compareKey", None)
pred_field2 = None
gt_field2 = None
if eval_key2 is not None:
if eval_key2:
info2 = ctx.dataset.get_evaluation_info(eval_key2)
pred_field2 = info2.config.pred_field
if info2.config.gt_field != gt_field:
Expand Down

0 comments on commit 68a5210

Please sign in to comment.