@@ -88,6 +88,7 @@ def __init__(self, server_ctx: Context, ml_dataset_openers=None):
8888 self ._data_store_pool ,
8989 self ._dataset_configs ,
9090 self .entrypoint_dataset_id ,
91+ self ._dataset_groups_config ,
9192 ) = self ._process_dataset_configs (self .config , self .base_dir )
9293 self ._cm_styles , self ._colormap_registry = self ._get_cm_styles ()
9394
@@ -469,6 +470,10 @@ def get_dataset_configs(self) -> list[DatasetConfig]:
469470 assert self ._dataset_configs is not None
470471 return self ._dataset_configs
471472
473+ def get_dataset_groups_configs (self ) -> list [DatasetConfig ]:
474+ assert self ._dataset_groups_config is not None
475+ return self ._dataset_groups_config
476+
472477 def get_entrypoint_dataset_id (self ) -> str | None :
473478 if self .entrypoint_dataset_id :
474479 return self .entrypoint_dataset_id
@@ -481,10 +486,11 @@ def get_data_store_pool(self) -> DataStorePool:
481486 @classmethod
482487 def _process_dataset_configs (
483488 cls , config : ServerConfig , base_dir : str
484- ) -> tuple [DataStorePool , list [dict [str , Any ]], str ]:
489+ ) -> tuple [DataStorePool , list [dict [str , Any ]], str , list [ dict [ str , Any ]] ]:
485490 data_store_configs = config .get ("DataStores" , [])
486491 dataset_configs = config .get ("Datasets" , [])
487492 entrypoint_dataset_id = config .get ("EntrypointDatasetId" , "" )
493+ dataset_groups_configs = config .get ("DatasetGroups" , [])
488494
489495 data_store_pool = DataStorePool ()
490496 for data_store_config_dict in data_store_configs :
@@ -504,7 +510,12 @@ def _process_dataset_configs(
504510 # entries:
505511 dataset_configs = [dict (c ) for c in dataset_configs ]
506512 cls ._maybe_assign_store_instance_ids (dataset_configs , data_store_pool , base_dir )
507- return data_store_pool , dataset_configs , entrypoint_dataset_id
513+ return (
514+ data_store_pool ,
515+ dataset_configs ,
516+ entrypoint_dataset_id ,
517+ dataset_groups_configs ,
518+ )
508519
509520 def get_rgb_color_mapping (
510521 self , ds_id : str , norm_range : tuple [float , float ] = (0.0 , 1.0 )
0 commit comments