Skip to content

Commit

Permalink
get nested datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Dec 3, 2024
1 parent 25eec51 commit e9127e8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
Field,
Progress,
SelectDataset,
SelectDatasetTree,
NotificationBox,
)

Expand Down Expand Up @@ -72,7 +73,7 @@ def update_globals(new_dataset_ids):


### Dataset selection
dataset_selector = SelectDataset(project_id=project_id, multiselect=True, select_all_datasets=True)
dataset_selector = SelectDatasetTree(project_id=project_id, multiselect=True, select_all_datasets=True)
card_project_settings = Card(title="Dataset selection", content=dataset_selector)

### Model selection
Expand Down Expand Up @@ -281,6 +282,14 @@ def update_table():
@btn_run.click
def run():
global model_name, global_idxs_mapping, all_info_list # , project_meta, dataset_ids, project_id, workspace_id, team_id

selected_datasets = set()
for dataset_id in dataset_selector.get_selected_ids():
selected_datasets.add(dataset_id)
for ds in api.dataset.get_nested(project_id=project_id, dataset_id=dataset_id):
selected_datasets.add(ds.id)
update_globals(list(selected_datasets))

info_run.description = ""
card_embeddings_chart.hide()
btn_mark.hide()
Expand Down

0 comments on commit e9127e8

Please sign in to comment.