Skip to content

Commit

Permalink
order umap list on compare page by align id
Browse files Browse the repository at this point in the history
  • Loading branch information
enjalot committed Mar 1, 2024
1 parent ee9d45c commit 6b54cd8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions web/src/pages/Compare.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ function Compare() {
console.log("embeddings", embeddingsData)
console.log("umaps", umapsData)
setEmbeddings(embeddingsData)
umapsData.sort((a, b) => {
if (b.align_id < a.align_id) return -1;
if (b.align_id > a.align_id) return 1;
if (a.id < b.id) return -1;
if (a.id > b.id) return 1;
return 0;
});
setUmaps(umapsData)
});
}, [datasetId, setEmbeddings, setUmaps]);
Expand Down Expand Up @@ -330,7 +337,7 @@ function Compare() {
let emb = embeddings.find(d => um.embedding_id == d.id)
return (
<option key={index} value={um.id}>
{um.embedding_id} - {um.id} - {emb?.model_id} [{emb?.dimensions}]
{um.embedding_id} - {um.id} - {emb?.model_id} [{emb?.dimensions}] {um.align_id}
</option>
)})}
</select>
Expand Down Expand Up @@ -363,7 +370,7 @@ function Compare() {
let emb = embeddings.find(d => um.embedding_id == d.id)
return (
<option key={index} value={um.id}>
{um.embedding_id} - {um.id} - {emb?.model_id} [{emb?.dimensions}]
{um.embedding_id} - {um.id} - {emb?.model_id} [{emb?.dimensions}] {um.align_id}
</option>
)})}
</select>
Expand Down

0 comments on commit 6b54cd8

Please sign in to comment.