Skip to content

Commit

Permalink
Fix sidebar indexes (#5143)
Browse files Browse the repository at this point in the history
* update size of sidebar boxes

* skip in progress indexes

---------

Co-authored-by: Benjamin Kane <[email protected]>
  • Loading branch information
CamronStaley and benjaminpkane authored Nov 19, 2024
1 parent 76bd458 commit bba04b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ const BoxDiv = styled.div`
export default function Box({
children,
text,
}: React.PropsWithChildren<{ text?: string }>) {
height = 30,
}: React.PropsWithChildren<{ text?: string; height?: number }>) {
const value = text === "Loading" ? <LoadingDots text="Loading" /> : text;
return (
<BoxDiv
style={{
height: 71,
height: height,
display: "flex",
justifyContent: "center",
flexDirection: "column",
Expand Down
4 changes: 4 additions & 0 deletions fiftyone/server/indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| `voxel51.com <https://voxel51.com/>`_
|
"""

from enum import Enum
import typing as t

Expand Down Expand Up @@ -58,6 +59,9 @@ def from_dict(d: t.Dict[str, t.Dict[str, t.Any]]):
def _from_dict(d: t.Dict[str, t.Dict[str, t.Any]]):
indexes: t.List[Index] = []
for name, index in d.items():
if index.get("in_progress", False):
continue

key = [_index_key_from_dict(*field) for field in index["key"]]
if None in key:
continue
Expand Down
2 changes: 1 addition & 1 deletion fiftyone/server/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,5 +697,5 @@ def _assign_estimated_counts(dataset: Dataset, fo_dataset: fo.Dataset):

def _assign_lightning_info(dataset: Dataset, fo_dataset: fo.Dataset):
dataset.sample_indexes, dataset.frame_indexes = indexes_from_dict(
fo_dataset.get_index_information()
fo_dataset.get_index_information(include_stats=True)
)

0 comments on commit bba04b8

Please sign in to comment.