project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CAREamics_careamics | Configuration | public | 0 | 1 | model_dump | def model_dump(self,*,mode: Literal["json", "python"] | str = "python",include: IncEx | None = None,exclude: IncEx | None = None,context: Any | None = None,by_alias: bool | None = False,exclude_unset: bool = False,exclude_defaults: bool = False,exclude_none: bool = True,round_trip: bool = False,warnings: bool | Literal... | 1 | 31 | 14 | 180 | 0 | 344 | 414 | 344 | self,mode,include,exclude,context,by_alias,exclude_unset,exclude_defaults,exclude_none,round_trip,warnings,fallback,serialize_as_any | [] | dict[str, Any] | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 71 | 2 | ["model_dump", "super"] | 26 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70411402_jeertmans_manim_slides.tests.test_wizard_py.test_init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70411402_jeertmans_manim_slides.tests.test_wizard_py.test_init_custom_path", "_.content.gdrive.MyDrive.P... | The function (model_dump) defined within the public class called Configuration, that inherit another class.The function start at line 344 and ends at 414. It contains 31 lines of code and it has a cyclomatic complexity of 1. It takes 14 parameters, represented as [344.0] and does not return any value. It declares 2.0 f... |
CAREamics_careamics | public | public | 0 | 0 | algorithm_factory | def algorithm_factory(algorithm: dict[str, Any],) -> Union[N2VAlgorithm, N2NAlgorithm, CAREAlgorithm]:"""Create an algorithm model for training CAREamics.Parameters----------algorithm : dictAlgorithm dictionary.Returns-------N2VAlgorithm or N2NAlgorithm or CAREAlgorithmAlgorithm model for training CAREamics."""adapter:... | 1 | 10 | 1 | 56 | 0 | 39 | 61 | 39 | algorithm | [] | Union[N2VAlgorithm, N2NAlgorithm, CAREAlgorithm] | {"AnnAssign": 1, "Expr": 1, "Return": 1} | 3 | 23 | 3 | ["TypeAdapter", "Field", "adapter.validate_python"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.lightning.dataset_ng.lightning_modules.unet_module_py.UnetModule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.lightni... | The function (algorithm_factory) defined within the public class called public.The function start at line 39 and ends at 61. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions call... |
CAREamics_careamics | public | public | 0 | 0 | _list_spatial_augmentations | def _list_spatial_augmentations(augmentations: list[SPATIAL_TRANSFORMS_UNION] | None = None,) -> list[SPATIAL_TRANSFORMS_UNION]:"""List the augmentations to apply.Parameters----------augmentations : list of transforms, optionalList of transforms to apply, either both or one of XYFlipModel andXYRandomRotate90Model.Retur... | 7 | 22 | 1 | 109 | 2 | 64 | 111 | 64 | augmentations | ['transform_list', 'aug_types'] | list[SPATIAL_TRANSFORMS_UNION] | {"AnnAssign": 1, "Assign": 2, "Expr": 1, "If": 3, "Return": 1} | 10 | 48 | 10 | ["XYFlipModel", "XYRandomRotate90Model", "all", "isinstance", "isinstance", "ValueError", "len", "set", "len", "ValueError"] | 12 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py._create_supervised_config_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configura... | The function (_list_spatial_augmentations) defined within the public class called public.The function start at line 64 and ends at 111. It contains 22 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 10.0 f... |
CAREamics_careamics | public | public | 0 | 0 | _create_unet_configuration | def _create_unet_configuration(axes: str,n_channels_in: int,n_channels_out: int,independent_channels: bool,use_n2v2: bool,model_params: dict[str, Any] | None = None,) -> UNetModel:"""Create a dictionary with the parameters of the UNet model.Parameters----------axes : strAxes of the data.n_channels_in : intNumber of inp... | 3 | 19 | 6 | 100 | 1 | 114 | 157 | 114 | axes,n_channels_in,n_channels_out,independent_channels,use_n2v2,model_params | ['model_params'] | UNetModel | {"Assign": 6, "Expr": 1, "If": 1, "Return": 1} | 1 | 44 | 1 | ["UNetModel"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py._create_algorithm_configuration", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.config.test_configurati... | The function (_create_unet_configuration) defined within the public class called public.The function start at line 114 and ends at 157. It contains 19 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [114.0] and does not return any value. It declare 1.0 function, It has 1.0 f... |
CAREamics_careamics | public | public | 0 | 0 | _create_algorithm_configuration | def _create_algorithm_configuration(axes: str,algorithm: Literal["n2v", "care", "n2n"],loss: Literal["n2v", "mae", "mse"],independent_channels: bool,n_channels_in: int,n_channels_out: int,use_n2v2: bool = False,model_params: dict | None = None,optimizer: Literal["Adam", "Adamax", "SGD"] = "Adam",optimizer_params: dict[... | 3 | 35 | 12 | 193 | 1 | 160 | 233 | 160 | axes,algorithm,loss,independent_channels,n_channels_in,n_channels_out,use_n2v2,model_params,optimizer,optimizer_params,lr_scheduler,lr_scheduler_params | ['unet_model'] | dict | {"Assign": 1, "Expr": 1, "Return": 1} | 1 | 74 | 1 | ["_create_unet_configuration"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py._create_supervised_config_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configura... | The function (_create_algorithm_configuration) defined within the public class called public.The function start at line 160 and ends at 233. It contains 35 lines of code and it has a cyclomatic complexity of 3. It takes 12 parameters, represented as [160.0] and does not return any value. It declare 1.0 function, It has... |
CAREamics_careamics | public | public | 0 | 0 | _create_data_configuration | def _create_data_configuration(data_type: Literal["array", "tiff", "czi", "custom"],axes: str,patch_size: Sequence[int],batch_size: int,augmentations: Union[list[SPATIAL_TRANSFORMS_UNION]],train_dataloader_params: dict[str, Any] | None = None,val_dataloader_params: dict[str, Any] | None = None,) -> DataConfig:"""Create... | 4 | 23 | 7 | 137 | 1 | 236 | 289 | 236 | data_type,axes,patch_size,batch_size,augmentations,train_dataloader_params,val_dataloader_params | ['data'] | DataConfig | {"Assign": 4, "Expr": 1, "If": 3, "Return": 1} | 1 | 54 | 1 | ["DataConfig"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py._create_supervised_config_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configura... | The function (_create_data_configuration) defined within the public class called public.The function start at line 236 and ends at 289. It contains 23 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [236.0] and does not return any value. It declare 1.0 function, It has 1.0 f... |
CAREamics_careamics | public | public | 0 | 0 | _create_microsplit_data_configuration | def _create_microsplit_data_configuration(data_type: Literal["array", "tiff", "custom"],axes: str,patch_size: Sequence[int],grid_size: int,multiscale_count: int,batch_size: int,augmentations: Union[list[SPATIAL_TRANSFORMS_UNION]],train_dataloader_params: dict[str, Any] | None = None,val_dataloader_params: dict[str, Any... | 4 | 27 | 9 | 151 | 1 | 292 | 349 | 292 | data_type,axes,patch_size,grid_size,multiscale_count,batch_size,augmentations,train_dataloader_params,val_dataloader_params | ['data'] | DataConfig | {"Assign": 4, "Expr": 1, "If": 3, "Return": 1} | 1 | 58 | 1 | ["MicroSplitDataConfig"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py.create_microsplit_configuration"] | The function (_create_microsplit_data_configuration) defined within the public class called public.The function start at line 292 and ends at 349. It contains 27 lines of code and it has a cyclomatic complexity of 4. It takes 9 parameters, represented as [292.0] and does not return any value. It declare 1.0 function, I... |
CAREamics_careamics | public | public | 0 | 0 | _create_ng_data_configuration | def _create_ng_data_configuration(data_type: Literal["array", "tiff", "custom"],axes: str,patch_size: Sequence[int],batch_size: int,augmentations: list[SPATIAL_TRANSFORMS_UNION],patch_overlaps: Sequence[int] | None = None,train_dataloader_params: dict[str, Any] | None = None,val_dataloader_params: dict[str, Any] | None... | 5 | 33 | 10 | 195 | 1 | 352 | 428 | 352 | data_type,axes,patch_size,batch_size,augmentations,patch_overlaps,train_dataloader_params,val_dataloader_params,test_dataloader_params,seed | ['data'] | NGDataConfig | {"Assign": 6, "Expr": 1, "If": 4, "Return": 1} | 1 | 77 | 1 | ["NGDataConfig"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset_ng.dataset.test_dataset_py.test_from_array", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset_ng.dataset.test_dataset_py.test_from_c... | The function (_create_ng_data_configuration) defined within the public class called public.The function start at line 352 and ends at 428. It contains 33 lines of code and it has a cyclomatic complexity of 5. It takes 10 parameters, represented as [352.0] and does not return any value. It declare 1.0 function, It has 1... |
CAREamics_careamics | public | public | 0 | 0 | _create_training_configuration | def _create_training_configuration(trainer_params: dict,logger: Literal["wandb", "tensorboard", "none"],checkpoint_params: dict[str, Any] | None = None,) -> TrainingConfig:"""Create a dictionary with the parameters of the training model.Parameters----------trainer_params : dictParameters for Lightning Trainer class, se... | 3 | 10 | 3 | 64 | 0 | 431 | 458 | 431 | trainer_params,logger,checkpoint_params | [] | TrainingConfig | {"Expr": 1, "Return": 1} | 1 | 28 | 1 | ["TrainingConfig"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py._create_supervised_config_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configura... | The function (_create_training_configuration) defined within the public class called public.The function start at line 431 and ends at 458. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [431.0] and does not return any value. It declare 1.0 function, It has 1... |
CAREamics_careamics | public | public | 0 | 0 | _create_supervised_config_dict | def _create_supervised_config_dict(algorithm: Literal["care", "n2n"],experiment_name: str,data_type: Literal["array", "tiff", "czi", "custom"],axes: str,patch_size: Sequence[int],batch_size: int,trainer_params: dict | None = None,augmentations: list[SPATIAL_TRANSFORMS_UNION] | None = None,independent_channels: bool = T... | 11 | 75 | 23 | 443 | 7 | 462 | 623 | 462 | algorithm,experiment_name,data_type,axes,patch_size,batch_size,trainer_params,augmentations,independent_channels,loss,n_channels_in,n_channels_out,logger,model_params,optimizer,optimizer_params,lr_scheduler,lr_scheduler_params,train_dataloader_params,val_dataloader_params,checkpoint_params,num_epochs,num_steps | ['algorithm_params', 'n_channels_out', 'training_params', 'spatial_transform_list', 'final_trainer_params', 'n_channels_in', 'data_params'] | dict | {"Assign": 9, "Expr": 1, "If": 6, "Return": 1} | 7 | 162 | 7 | ["ValueError", "ValueError", "_list_spatial_augmentations", "_create_algorithm_configuration", "_create_data_configuration", "trainer_params.copy", "_create_training_configuration"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py.create_care_configuration", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_... | The function (_create_supervised_config_dict) defined within the public class called public.The function start at line 462 and ends at 623. It contains 75 lines of code and it has a cyclomatic complexity of 11. It takes 23 parameters, represented as [462.0] and does not return any value. It declares 7.0 functions, It h... |
CAREamics_careamics | public | public | 0 | 0 | create_care_configuration | def create_care_configuration(experiment_name: str,data_type: Literal["array", "tiff", "czi", "custom"],axes: str,patch_size: Sequence[int],batch_size: int,num_epochs: int = 100,num_steps: int | None = None,augmentations: list[Union[XYFlipModel, XYRandomRotate90Model]] | None = None,independent_channels: bool = True,lo... | 1 | 51 | 22 | 320 | 0 | 626 | 860 | 626 | experiment_name,data_type,axes,patch_size,batch_size,num_epochs,num_steps,augmentations,independent_channels,loss,n_channels_in,n_channels_out,logger,trainer_params,model_params,optimizer,optimizer_params,lr_scheduler,lr_scheduler_params,train_dataloader_params,val_dataloader_params,checkpoint_params | [] | Configuration | {"Expr": 1, "Return": 1} | 2 | 235 | 2 | ["Configuration", "_create_supervised_config_dict"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.cli.conf_py.care", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.config.test_configuration_factories_py.test_care_configuration", "_.cont... | The function (create_care_configuration) defined within the public class called public.The function start at line 626 and ends at 860. It contains 51 lines of code and it has a cyclomatic complexity of 1. It takes 22 parameters, represented as [626.0] and does not return any value. It declares 2.0 functions, It has 2.0... |
CAREamics_careamics | public | public | 0 | 0 | create_n2n_configuration | def create_n2n_configuration(experiment_name: str,data_type: Literal["array", "tiff", "czi", "custom"],axes: str,patch_size: Sequence[int],batch_size: int,num_epochs: int = 100,num_steps: int | None = None,augmentations: list[Union[XYFlipModel, XYRandomRotate90Model]] | None = None,independent_channels: bool = True,los... | 1 | 51 | 22 | 320 | 0 | 863 | 1,096 | 863 | experiment_name,data_type,axes,patch_size,batch_size,num_epochs,num_steps,augmentations,independent_channels,loss,n_channels_in,n_channels_out,logger,trainer_params,model_params,optimizer,optimizer_params,lr_scheduler,lr_scheduler_params,train_dataloader_params,val_dataloader_params,checkpoint_params | [] | Configuration | {"Expr": 1, "Return": 1} | 2 | 234 | 2 | ["Configuration", "_create_supervised_config_dict"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.cli.conf_py.n2n", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.config.test_configuration_factories_py.test_checkpoint_model_save_top_k_c... | The function (create_n2n_configuration) defined within the public class called public.The function start at line 863 and ends at 1096. It contains 51 lines of code and it has a cyclomatic complexity of 1. It takes 22 parameters, represented as [863.0] and does not return any value. It declares 2.0 functions, It has 2.0... |
CAREamics_careamics | public | public | 0 | 0 | create_n2v_configuration | def create_n2v_configuration(experiment_name: str,data_type: Literal["array", "tiff", "czi", "custom"],axes: str,patch_size: Sequence[int],batch_size: int,num_epochs: int = 100,num_steps: int | None = None,augmentations: list[Union[XYFlipModel, XYRandomRotate90Model]] | None = None,independent_channels: bool = True,use... | 11 | 89 | 25 | 507 | 7 | 1,099 | 1,434 | 1,099 | experiment_name,data_type,axes,patch_size,batch_size,num_epochs,num_steps,augmentations,independent_channels,use_n2v2,n_channels,roi_size,masked_pixel_percentage,struct_n2v_axis,struct_n2v_span,trainer_params,logger,model_params,optimizer,optimizer_params,lr_scheduler,lr_scheduler_params,train_dataloader_params,val_dat... | ['algorithm_params', 'training_params', 'spatial_transforms', 'final_trainer_params', 'n2v_transform', 'n_channels', 'data_params'] | Configuration | {"Assign": 10, "Expr": 1, "If": 5, "Return": 1} | 9 | 336 | 9 | ["ValueError", "ValueError", "_list_spatial_augmentations", "N2VManipulateModel", "_create_algorithm_configuration", "_create_data_configuration", "trainer_params.copy", "_create_training_configuration", "Configuration"] | 21 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.cli.conf_py.n2v", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.config.test_configuration_factories_py.test_checkpoint_model_comprehensiv... | The function (create_n2v_configuration) defined within the public class called public.The function start at line 1099 and ends at 1434. It contains 89 lines of code and it has a cyclomatic complexity of 11. It takes 25 parameters, represented as [1099.0] and does not return any value. It declares 9.0 functions, It has ... |
CAREamics_careamics | public | public | 0 | 0 | _create_vae_configuration | def _create_vae_configuration(input_shape: Sequence[int],encoder_conv_strides: tuple[int, ...],decoder_conv_strides: tuple[int, ...],multiscale_count: int,z_dims: tuple[int, ...],output_channels: int,encoder_n_filters: int,decoder_n_filters: int,encoder_dropout: float,decoder_dropout: float,nonlinearity: Literal["None"... | 1 | 33 | 13 | 161 | 0 | 1,437 | 1,505 | 1,437 | input_shape,encoder_conv_strides,decoder_conv_strides,multiscale_count,z_dims,output_channels,encoder_n_filters,decoder_n_filters,encoder_dropout,decoder_dropout,nonlinearity,predict_logvar,analytical_kl | [] | LVAEModel | {"Expr": 1, "Return": 1} | 1 | 69 | 1 | ["LVAEModel"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py._create_vae_based_algorithm", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuratio... | The function (_create_vae_configuration) defined within the public class called public.The function start at line 1437 and ends at 1505. It contains 33 lines of code and it has a cyclomatic complexity of 1. It takes 13 parameters, represented as [1437.0] and does not return any value. It declare 1.0 function, It has 1.... |
CAREamics_careamics | public | public | 0 | 0 | _create_vae_based_algorithm | def _create_vae_based_algorithm(algorithm: Literal["hdn", "microsplit"],loss: LVAELossConfig,input_shape: Sequence[int],encoder_conv_strides: tuple[int, ...],decoder_conv_strides: tuple[int, ...],multiscale_count: int,z_dims: tuple[int, ...],output_channels: int,encoder_n_filters: int,decoder_n_filters: int,encoder_dro... | 2 | 44 | 17 | 212 | 1 | 1,508 | 1,596 | 1,508 | algorithm,loss,input_shape,encoder_conv_strides,decoder_conv_strides,multiscale_count,z_dims,output_channels,encoder_n_filters,decoder_n_filters,encoder_dropout,decoder_dropout,nonlinearity,predict_logvar,analytical_kl,gaussian_likelihood,nm_likelihood | ['network_model'] | dict | {"Assign": 1, "Expr": 1, "Return": 1} | 1 | 89 | 1 | ["_create_vae_configuration"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py.create_hdn_configuration"] | The function (_create_vae_based_algorithm) defined within the public class called public.The function start at line 1508 and ends at 1596. It contains 44 lines of code and it has a cyclomatic complexity of 2. It takes 17 parameters, represented as [1508.0] and does not return any value. It declare 1.0 function, It has ... |
CAREamics_careamics | public | public | 0 | 0 | get_likelihood_config | def get_likelihood_config(loss_type: Literal["musplit", "denoisplit", "denoisplit_musplit"],# TODO remove different microsplit loss types, refacpredict_logvar: Literal["pixelwise"] | None = None,logvar_lowerbound: float | None = -5.0,nm_paths: list[str] | None = None,data_stats: tuple[float, float] | None = None,) -> t... | 1 | 10 | 5 | 75 | 0 | 1,599 | 1,609 | 1,599 | loss_type,predict_logvar,logvar_lowerbound,nm_paths,data_stats | [] | tuple[GaussianLikelihoodConfig | None, MultiChannelNMConfig | None, NMLikelihoodConfig | None] | {"Assign": 7, "Expr": 2, "For": 1, "If": 3, "Return": 1} | 5 | 83 | 5 | ["GaussianLikelihoodConfig", "gmm_list.append", "GaussianMixtureNMConfig", "MultiChannelNMConfig", "NMLikelihoodConfig"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.configuration_factories_py.create_microsplit_configuration"] | The function (get_likelihood_config) defined within the public class called public.The function start at line 1599 and ends at 1609. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1599.0] and does not return any value. It declares 5.0 functions, It has 5.0 f... |
CAREamics_careamics | public | public | 0 | 0 | create_hdn_configuration | def create_hdn_configuration(experiment_name: str,data_type: Literal["array", "tiff", "custom"],axes: str,patch_size: Sequence[int],batch_size: int,num_epochs: int = 100,num_steps: int | None = None,encoder_conv_strides: tuple[int, ...] = (2, 2),decoder_conv_strides: tuple[int, ...] = (2, 2),multiscale_count: int = 1,z... | 4 | 79 | 9 | 459 | 7 | 1,686 | 1,883 | 1,686 | experiment_name,data_type,axes,patch_size,batch_size,num_epochs,num_steps,encoder_conv_strides,decoder_conv_strides,multiscale_count,z_dims,output_channels,encoder_n_filters,decoder_n_filters,encoder_dropout,decoder_dropout,nonlinearity,analytical_kl,predict_logvar,logvar_lowerbound,logger,trainer_params,augmentations,... | ['gaussian_likelihood', 'algorithm_params', 'training_params', 'transform_list', 'loss_config', 'final_trainer_params', 'data_params'] | Configuration | {"Assign": 9, "Expr": 1, "If": 2, "Return": 1} | 8 | 198 | 8 | ["_list_spatial_augmentations", "LVAELossConfig", "GaussianLikelihoodConfig", "_create_vae_based_algorithm", "_create_data_configuration", "trainer_params.copy", "_create_training_configuration", "Configuration"] | 0 | [] | The function (create_hdn_configuration) defined within the public class called public.The function start at line 1686 and ends at 1883. It contains 79 lines of code and it has a cyclomatic complexity of 4. It takes 9 parameters, represented as [1686.0] and does not return any value. It declares 8.0 functions, and It h... |
CAREamics_careamics | public | public | 0 | 0 | create_microsplit_configuration | def create_microsplit_configuration(experiment_name: str,data_type: Literal["array", "tiff", "custom"],axes: str,patch_size: Sequence[int],batch_size: int,num_epochs: int = 100,num_steps: int | None = None,encoder_conv_strides: tuple[int, ...] = (2, 2),decoder_conv_strides: tuple[int, ...] = (2, 2),multiscale_count: in... | 4 | 95 | 9 | 537 | 8 | 1,886 | 2,089 | 1,886 | experiment_name,data_type,axes,patch_size,batch_size,num_epochs,num_steps,encoder_conv_strides,decoder_conv_strides,multiscale_count,grid_size,z_dims,output_channels,encoder_n_filters,decoder_n_filters,encoder_dropout,decoder_dropout,nonlinearity,analytical_kl,predict_logvar,logvar_lowerbound,logger,trainer_params,augm... | ['algorithm_params', 'training_params', 'network_model', 'transform_list', 'loss_config', 'final_trainer_params', 'algorithm_config', 'data_params'] | Configuration | {"Assign": 11, "Expr": 1, "If": 2, "Return": 1} | 9 | 204 | 9 | ["_list_spatial_augmentations", "LVAELossConfig", "get_likelihood_config", "_create_vae_configuration", "MicroSplitAlgorithm", "_create_microsplit_data_configuration", "trainer_params.copy", "_create_training_configuration", "Configuration"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.config.test_configuration_factories_py.test_microsplit_configuration"] | The function (create_microsplit_configuration) defined within the public class called public.The function start at line 1886 and ends at 2089. It contains 95 lines of code and it has a cyclomatic complexity of 4. It takes 9 parameters, represented as [1886.0] and does not return any value. It declares 9.0 functions, It... |
CAREamics_careamics | public | public | 0 | 0 | load_configuration | def load_configuration(path: Union[str, Path]) -> Configuration:"""Load configuration from a yaml file.Parameters----------path : str or PathPath to the configuration.Returns-------ConfigurationConfiguration.Raises------FileNotFoundErrorIf the configuration file does not exist."""# load dictionary from yamlif not Path(... | 2 | 7 | 1 | 62 | 1 | 11 | 38 | 11 | path | ['dictionary'] | Configuration | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 8 | 28 | 8 | ["exists", "Path", "FileNotFoundError", "Path.cwd", "yaml.load", "open", "Path", "Configuration"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.careamist_py.CAREamist.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.model_io.bmz_io_py.load_from_bmz", "_.content.gdr... | The function (load_configuration) defined within the public class called public.The function start at line 11 and ends at 38. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 functions call... |
CAREamics_careamics | public | public | 0 | 0 | save_configuration | def save_configuration(config: Configuration, path: Union[str, Path]) -> Path:"""Save configuration to path.Parameters----------config : ConfigurationConfiguration to save.path : str or PathPath to a existing folder in which to save the configuration, or to a validconfiguration file path (uses a .yml or .yaml extension... | 7 | 17 | 2 | 119 | 1 | 41 | 85 | 41 | config,path | ['config_path'] | Path | {"Assign": 2, "Expr": 2, "If": 4, "Return": 1, "With": 1} | 9 | 45 | 9 | ["Path", "config_path.exists", "config_path.is_dir", "Path", "ValueError", "ValueError", "open", "yaml.dump", "config.model_dump"] | 8 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.cli.conf_py._config_builder_exit", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.model_io.bmz_io_py.export_to_bmz", "_.content.gd... | The function (save_configuration) defined within the public class called public.The function start at line 41 and ends at 85. It contains 17 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [41.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions ... |
CAREamics_careamics | InferenceConfig | public | 0 | 1 | all_elements_non_zero_even | def all_elements_non_zero_even(cls, tile_overlap: list[int] | None) -> list[int] | None:"""Validate tile overlap.Overlaps must be non-zero, positive and even.Parameters----------tile_overlap : list[int] or NonePatch size.Returns-------list[int] or NoneValidated tile overlap.Raises------ValueErrorIf the patch size is 0.... | 5 | 12 | 2 | 59 | 0 | 47 | 82 | 47 | cls,tile_overlap | [] | list[int] | None | {"Expr": 1, "For": 1, "If": 3, "Return": 1} | 3 | 36 | 3 | ["ValueError", "ValueError", "field_validator"] | 0 | [] | The function (all_elements_non_zero_even) defined within the public class called InferenceConfig, that inherit another class.The function start at line 47 and ends at 82. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [47.0] and does not return any value. It ... |
CAREamics_careamics | InferenceConfig | public | 0 | 1 | tile_min_8_power_of_2 | def tile_min_8_power_of_2(cls, tile_list: list[int] | None) -> list[int] | None:"""Validate that each entry is greater or equal than 8 and a power of 2.Parameters----------tile_list : list of intPatch size.Returns-------list of intValidated patch size.Raises------ValueErrorIf the patch size if smaller than 8.ValueError... | 1 | 3 | 2 | 28 | 0 | 86 | 109 | 86 | cls,tile_list | [] | list[int] | None | {"Expr": 2, "Return": 1} | 2 | 24 | 2 | ["patch_size_ge_than_8_power_of_2", "field_validator"] | 0 | [] | The function (tile_min_8_power_of_2) defined within the public class called InferenceConfig, that inherit another class.The function start at line 86 and ends at 109. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [86.0] and does not return any value. It decla... |
CAREamics_careamics | InferenceConfig | public | 0 | 1 | axes_valid | def axes_valid(cls, axes: str) -> str:"""Validate axes.Axes must:- be a combination of 'STCZYX'- not contain duplicates- contain at least 2 contiguous axes: X and Y- contain at most 4 axes- not contain both S and T axesParameters----------axes : strAxes to validate.Returns-------strValidated axes.Raises------ValueError... | 1 | 3 | 2 | 18 | 0 | 113 | 142 | 113 | cls,axes | [] | str | {"Expr": 2, "Return": 1} | 2 | 30 | 2 | ["check_axes_validity", "field_validator"] | 0 | [] | The function (axes_valid) defined within the public class called InferenceConfig, that inherit another class.The function start at line 113 and ends at 142. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [113.0] and does not return any value. It declares 2.0 f... |
CAREamics_careamics | InferenceConfig | public | 0 | 1 | validate_dimensions | def validate_dimensions(self: Self) -> Self:"""Validate 2D/3D dimensions between axes and tile size.Returns-------SelfValidated prediction model."""expected_len = 3 if "Z" in self.axes else 2if self.tile_size is not None and self.tile_overlap is not None:if len(self.tile_size) != expected_len:raise ValueError(f"Tile si... | 8 | 19 | 1 | 108 | 0 | 145 | 175 | 145 | self | [] | Self | {"Assign": 1, "Expr": 1, "If": 4, "Return": 1} | 8 | 31 | 8 | ["len", "ValueError", "len", "ValueError", "any", "zip", "ValueError", "model_validator"] | 0 | [] | The function (validate_dimensions) defined within the public class called InferenceConfig, that inherit another class.The function start at line 145 and ends at 175. It contains 19 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares... |
CAREamics_careamics | InferenceConfig | public | 0 | 1 | std_only_with_mean | def std_only_with_mean(self: Self) -> Self:"""Check that mean and std are either both None, or both specified.Returns-------SelfValidated prediction model.Raises------ValueErrorIf std is not None and mean is None."""# check that mean and std are either both None, or both specifiedif not self.image_means and not self.im... | 10 | 16 | 1 | 95 | 0 | 178 | 210 | 178 | self | [] | Self | {"Expr": 1, "If": 3, "Return": 1} | 6 | 33 | 6 | ["ValueError", "ValueError", "len", "len", "ValueError", "model_validator"] | 0 | [] | The function (std_only_with_mean) defined within the public class called InferenceConfig, that inherit another class.The function start at line 178 and ends at 210. It contains 16 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value. It declares... |
CAREamics_careamics | InferenceConfig | public | 0 | 1 | _update | def _update(self, **kwargs: Any) -> None:"""Update multiple arguments at once.Parameters----------**kwargs : AnyKey-value pairs of arguments to update."""self.__dict__.update(kwargs)self.__class__.model_validate(self.__dict__) | 1 | 3 | 2 | 31 | 0 | 212 | 222 | 212 | self,**kwargs | [] | None | {"Expr": 3} | 2 | 11 | 2 | ["self.__dict__.update", "self.__class__.model_validate"] | 0 | [] | The function (_update) defined within the public class called InferenceConfig, that inherit another class.The function start at line 212 and ends at 222. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [212.0] and does not return any value. It declares 2.0 func... |
CAREamics_careamics | InferenceConfig | public | 0 | 1 | set_3D | def set_3D(self, axes: str, tile_size: list[int], tile_overlap: list[int]) -> None:"""Set 3D parameters.Parameters----------axes : strAxes.tile_size : list of intTile size.tile_overlap : list of intTile overlap."""self._update(axes=axes, tile_size=tile_size, tile_overlap=tile_overlap) | 1 | 2 | 4 | 42 | 0 | 224 | 237 | 224 | self,axes,tile_size,tile_overlap | [] | None | {"Expr": 2} | 1 | 14 | 1 | ["self._update"] | 0 | [] | The function (set_3D) defined within the public class called InferenceConfig, that inherit another class.The function start at line 224 and ends at 237. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [224.0] and does not return any value. It declare 1.0 functi... |
CAREamics_careamics | GaussianMixtureNMConfig | public | 0 | 1 | validate_path | def validate_path(self: Self) -> Self:"""Validate that the path points to a valid .npz file if provided.Returns-------SelfReturns itself.Raises------ValueErrorIf the path is provided but does not point to a valid .npz file."""if self.path is not None:path = Path(self.path)if not path.exists():raise ValueError(f"Path {p... | 5 | 10 | 1 | 69 | 0 | 91 | 112 | 91 | self | [] | Self | {"Assign": 1, "Expr": 1, "If": 4, "Return": 1} | 7 | 22 | 7 | ["Path", "path.exists", "ValueError", "ValueError", "path.is_file", "ValueError", "model_validator"] | 0 | [] | The function (validate_path) defined within the public class called GaussianMixtureNMConfig, that inherit another class.The function start at line 91 and ends at 112. It contains 10 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declare... |
CAREamics_careamics | OptimizerModel | public | 0 | 1 | filter_parameters | def filter_parameters(cls, user_params: dict, values: ValidationInfo) -> dict:"""Validate optimizer parameters.This method filters out unknown parameters, given the optimizer name.Parameters----------user_params : dictParameters passed on to the torch optimizer.values : ValidationInfoPydantic field validation info, use... | 1 | 5 | 3 | 42 | 0 | 60 | 91 | 60 | cls,user_params,values | [] | dict | {"Assign": 3, "Expr": 1, "Return": 1} | 3 | 32 | 3 | ["getattr", "filter_parameters", "field_validator"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.optimizer_models_py.LrSchedulerModel.filter_parameters", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.optimizer_mo... | The function (filter_parameters) defined within the public class called OptimizerModel, that inherit another class.The function start at line 60 and ends at 91. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [60.0] and does not return any value. It declares 3.... |
CAREamics_careamics | OptimizerModel | public | 0 | 1 | sgd_lr_parameter | def sgd_lr_parameter(self) -> Self:"""Check that SGD optimizer has the mandatory `lr` parameter specified.This is specific for PyTorch < 2.2.Returns-------SelfValidated optimizer.Raises------ValueErrorIf the optimizer is SGD and the lr parameter is not specified."""if self.name == SupportedOptimizer.SGD and "lr" not in... | 3 | 7 | 1 | 32 | 0 | 94 | 116 | 94 | self | [] | Self | {"Expr": 1, "If": 1, "Return": 1} | 2 | 23 | 2 | ["ValueError", "model_validator"] | 0 | [] | The function (sgd_lr_parameter) defined within the public class called OptimizerModel, that inherit another class.The function start at line 94 and ends at 116. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 f... |
CAREamics_careamics | OptimizerModel | public | 0 | 1 | filter_parameters | def filter_parameters(cls, user_params: dict, values: ValidationInfo) -> dict:"""Filter parameters based on the learning rate scheduler's signature.Parameters----------user_params : dictUser parameters.values : ValidationInfoPydantic field validation info, used to get the scheduler name.Returns-------dictFiltered sched... | 3 | 9 | 3 | 62 | 0 | 154 | 186 | 154 | cls,user_params,values | [] | dict | {"Assign": 3, "Expr": 1, "Return": 1} | 3 | 32 | 3 | ["getattr", "filter_parameters", "field_validator"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.optimizer_models_py.LrSchedulerModel.filter_parameters", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.optimizer_mo... | The function (filter_parameters) defined within the public class called OptimizerModel, that inherit another class.The function start at line 154 and ends at 186. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [154.0] and does not return any value. It declares... |
CAREamics_careamics | TileInformation | public | 0 | 1 | __eq__ | def __eq__(self, other_tile: object):"""Check if two tile information objects are equal.Parameters----------other_tile : objectTile information object to compare with.Returns-------boolWhether the two tile information objects are equal."""if not isinstance(other_tile, TileInformation):return NotImplementedreturn (self.... | 6 | 10 | 2 | 63 | 0 | 43 | 65 | 43 | self,other_tile | [] | Returns | {"Expr": 1, "If": 1, "Return": 2} | 1 | 23 | 1 | ["isinstance"] | 17 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.test_messages_py.test_equality_check_against_none", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3649567_noirello_bonsai.src.bonsai.ldapentry_py.LDAPEntry.__eq__", "_.content.gdri... | The function (__eq__) defined within the public class called TileInformation, that inherit another class.The function start at line 43 and ends at 65. It contains 10 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [43.0], and this function return a value. It declare 1.0 func... |
CAREamics_careamics | TrainingConfig | public | 0 | 1 | __str__ | def __str__(self) -> str:"""Pretty string reprensenting the configuration.Returns-------strPretty string."""return pformat(self.model_dump()) | 1 | 2 | 1 | 17 | 0 | 51 | 59 | 51 | self | [] | str | {"Expr": 1, "Return": 1} | 2 | 9 | 2 | ["pformat", "self.model_dump"] | 19 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.models_py.NormalProxy.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.mod... | The function (__str__) defined within the public class called TrainingConfig, that inherit another class.The function start at line 51 and ends at 59. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, ... |
CAREamics_careamics | TrainingConfig | public | 0 | 1 | has_logger | def has_logger(self) -> bool:"""Check if the logger is defined.Returns-------boolWhether the logger is defined or not."""return self.logger is not None | 1 | 2 | 1 | 15 | 0 | 61 | 69 | 61 | self | [] | bool | {"Expr": 1, "Return": 1} | 0 | 9 | 0 | [] | 0 | [] | The function (has_logger) defined within the public class called TrainingConfig, that inherit another class.The function start at line 61 and ends at 69. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | CAREAlgorithm | public | 0 | 1 | get_algorithm_friendly_name | def get_algorithm_friendly_name(self) -> str:"""Get the algorithm friendly name.Returns-------strFriendly name of the algorithm."""return CARE | 1 | 2 | 1 | 10 | 0 | 58 | 67 | 58 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 0 | [] | The function (get_algorithm_friendly_name) defined within the public class called CAREAlgorithm, that inherit another class.The function start at line 58 and ends at 67. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | CAREAlgorithm | public | 0 | 1 | get_algorithm_keywords | def get_algorithm_keywords(self) -> list[str]:"""Get algorithm keywords.Returns-------list[str]List of keywords."""return ["restoration","UNet","3D" if self.model.is_3D() else "2D","CAREamics","pytorch",CARE,] | 2 | 9 | 1 | 36 | 0 | 69 | 85 | 69 | self | [] | list[str] | {"Expr": 1, "Return": 1} | 1 | 17 | 1 | ["self.model.is_3D"] | 0 | [] | The function (get_algorithm_keywords) defined within the public class called CAREAlgorithm, that inherit another class.The function start at line 69 and ends at 85. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.... |
CAREamics_careamics | CAREAlgorithm | public | 0 | 1 | get_algorithm_references | def get_algorithm_references(self) -> str:"""Get the algorithm references.This is used to generate the README of the BioImage Model Zoo export.Returns-------strAlgorithm references."""return CARE_REF.text + " doi: " + CARE_REF.doi | 1 | 2 | 1 | 18 | 0 | 87 | 98 | 87 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 12 | 0 | [] | 0 | [] | The function (get_algorithm_references) defined within the public class called CAREAlgorithm, that inherit another class.The function start at line 87 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | CAREAlgorithm | public | 0 | 1 | get_algorithm_citations | def get_algorithm_citations(self) -> list[CiteEntry]:"""Return a list of citation entries of the current algorithm.This is used to generate the model description for the BioImage Model Zoo.Returns-------List[CiteEntry]List of citation entries."""return [CARE_REF] | 1 | 2 | 1 | 15 | 0 | 100 | 111 | 100 | self | [] | list[CiteEntry] | {"Expr": 1, "Return": 1} | 0 | 12 | 0 | [] | 0 | [] | The function (get_algorithm_citations) defined within the public class called CAREAlgorithm, that inherit another class.The function start at line 100 and ends at 111. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | CAREAlgorithm | public | 0 | 1 | get_algorithm_description | def get_algorithm_description(self) -> str:"""Get the algorithm description.Returns-------strAlgorithm description."""return CARE_DESCRIPTION | 1 | 2 | 1 | 10 | 0 | 113 | 122 | 113 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 0 | [] | The function (get_algorithm_description) defined within the public class called CAREAlgorithm, that inherit another class.The function start at line 113 and ends at 122. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | HDNAlgorithm | public | 0 | 1 | get_algorithm_friendly_name | def get_algorithm_friendly_name(self) -> str:"""Get the algorithm friendly name.Returns-------strFriendly name of the algorithm."""return HDN | 1 | 2 | 1 | 10 | 0 | 40 | 49 | 40 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 0 | [] | The function (get_algorithm_friendly_name) defined within the public class called HDNAlgorithm, that inherit another class.The function start at line 40 and ends at 49. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | HDNAlgorithm | public | 0 | 1 | get_algorithm_keywords | def get_algorithm_keywords(self) -> list[str]:"""Get algorithm keywords.Returns-------list[str]List of keywords."""return ["restoration","VAE","3D" if self.model.is_3D() else "2D","CAREamics","pytorch",] | 2 | 8 | 1 | 34 | 0 | 51 | 66 | 51 | self | [] | list[str] | {"Expr": 1, "Return": 1} | 1 | 16 | 1 | ["self.model.is_3D"] | 0 | [] | The function (get_algorithm_keywords) defined within the public class called HDNAlgorithm, that inherit another class.The function start at line 51 and ends at 66. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0... |
CAREamics_careamics | HDNAlgorithm | public | 0 | 1 | get_algorithm_references | def get_algorithm_references(self) -> str:"""Get the algorithm references.This is used to generate the README of the BioImage Model Zoo export.Returns-------strAlgorithm references."""return HDN_REF.text + " doi: " + HDN_REF.doi | 1 | 2 | 1 | 18 | 0 | 68 | 79 | 68 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 12 | 0 | [] | 0 | [] | The function (get_algorithm_references) defined within the public class called HDNAlgorithm, that inherit another class.The function start at line 68 and ends at 79. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | HDNAlgorithm | public | 0 | 1 | get_algorithm_citations | def get_algorithm_citations(self) -> list[CiteEntry]:"""Return a list of citation entries of the current algorithm.This is used to generate the model description for the BioImage Model Zoo.Returns-------List[CiteEntry]List of citation entries."""return [HDN_REF] | 1 | 2 | 1 | 15 | 0 | 81 | 92 | 81 | self | [] | list[CiteEntry] | {"Expr": 1, "Return": 1} | 0 | 12 | 0 | [] | 0 | [] | The function (get_algorithm_citations) defined within the public class called HDNAlgorithm, that inherit another class.The function start at line 81 and ends at 92. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | HDNAlgorithm | public | 0 | 1 | get_algorithm_description | def get_algorithm_description(self) -> str:"""Get the algorithm description.Returns-------strAlgorithm description."""return HDN_DESCRIPTION | 1 | 2 | 1 | 10 | 0 | 94 | 103 | 94 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 0 | [] | The function (get_algorithm_description) defined within the public class called HDNAlgorithm, that inherit another class.The function start at line 94 and ends at 103. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | MicroSplitAlgorithm | public | 0 | 1 | get_algorithm_friendly_name | def get_algorithm_friendly_name(self) -> str:"""Get the algorithm friendly name.Returns-------strFriendly name of the algorithm."""return MICROSPLIT | 1 | 2 | 1 | 10 | 0 | 39 | 48 | 39 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 0 | [] | The function (get_algorithm_friendly_name) defined within the public class called MicroSplitAlgorithm, that inherit another class.The function start at line 39 and ends at 48. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | MicroSplitAlgorithm | public | 0 | 1 | get_algorithm_keywords | def get_algorithm_keywords(self) -> list[str]:"""Get algorithm keywords.Returns-------list[str]List of keywords."""return ["restoration","VAE","self-supervised","3D" if self.model.is_3D() else "2D","CAREamics","pytorch",] | 2 | 9 | 1 | 36 | 0 | 50 | 66 | 50 | self | [] | list[str] | {"Expr": 1, "Return": 1} | 1 | 17 | 1 | ["self.model.is_3D"] | 0 | [] | The function (get_algorithm_keywords) defined within the public class called MicroSplitAlgorithm, that inherit another class.The function start at line 50 and ends at 66. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It decl... |
CAREamics_careamics | MicroSplitAlgorithm | public | 0 | 1 | get_algorithm_references | def get_algorithm_references(self) -> str:"""Get the algorithm references.This is used to generate the README of the BioImage Model Zoo export.Returns-------strAlgorithm references."""return MICROSPLIT_REF.text + " doi: " + MICROSPLIT_REF.doi | 1 | 2 | 1 | 18 | 0 | 68 | 79 | 68 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 12 | 0 | [] | 0 | [] | The function (get_algorithm_references) defined within the public class called MicroSplitAlgorithm, that inherit another class.The function start at line 68 and ends at 79. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | MicroSplitAlgorithm | public | 0 | 1 | get_algorithm_citations | def get_algorithm_citations(self) -> list[CiteEntry]:"""Return a list of citation entries of the current algorithm.This is used to generate the model description for the BioImage Model Zoo.Returns-------List[CiteEntry]List of citation entries."""return [MICROSPLIT_REF] | 1 | 2 | 1 | 15 | 0 | 81 | 92 | 81 | self | [] | list[CiteEntry] | {"Expr": 1, "Return": 1} | 0 | 12 | 0 | [] | 0 | [] | The function (get_algorithm_citations) defined within the public class called MicroSplitAlgorithm, that inherit another class.The function start at line 81 and ends at 92. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | MicroSplitAlgorithm | public | 0 | 1 | get_algorithm_description | def get_algorithm_description(self) -> str:"""Get the algorithm description.Returns-------strAlgorithm description."""return MICROSPLIT_DESCRIPTION | 1 | 2 | 1 | 10 | 0 | 94 | 103 | 94 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 0 | [] | The function (get_algorithm_description) defined within the public class called MicroSplitAlgorithm, that inherit another class.The function start at line 94 and ends at 103. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | N2NAlgorithm | public | 0 | 1 | get_algorithm_friendly_name | def get_algorithm_friendly_name(self) -> str:"""Get the algorithm friendly name.Returns-------strFriendly name of the algorithm."""return N2N | 1 | 2 | 1 | 10 | 0 | 51 | 60 | 51 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 0 | [] | The function (get_algorithm_friendly_name) defined within the public class called N2NAlgorithm, that inherit another class.The function start at line 51 and ends at 60. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | N2NAlgorithm | public | 0 | 1 | get_algorithm_keywords | def get_algorithm_keywords(self) -> list[str]:"""Get algorithm keywords.Returns-------list[str]List of keywords."""return ["restoration","UNet","3D" if self.model.is_3D() else "2D","CAREamics","pytorch",N2N,] | 2 | 9 | 1 | 36 | 0 | 62 | 78 | 62 | self | [] | list[str] | {"Expr": 1, "Return": 1} | 1 | 17 | 1 | ["self.model.is_3D"] | 0 | [] | The function (get_algorithm_keywords) defined within the public class called N2NAlgorithm, that inherit another class.The function start at line 62 and ends at 78. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0... |
CAREamics_careamics | N2NAlgorithm | public | 0 | 1 | get_algorithm_references | def get_algorithm_references(self) -> str:"""Get the algorithm references.This is used to generate the README of the BioImage Model Zoo export.Returns-------strAlgorithm references."""return N2N_REF.text + " doi: " + N2N_REF.doi | 1 | 2 | 1 | 18 | 0 | 80 | 91 | 80 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 12 | 0 | [] | 0 | [] | The function (get_algorithm_references) defined within the public class called N2NAlgorithm, that inherit another class.The function start at line 80 and ends at 91. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | N2NAlgorithm | public | 0 | 1 | get_algorithm_citations | def get_algorithm_citations(self) -> list[CiteEntry]:"""Return a list of citation entries of the current algorithm.This is used to generate the model description for the BioImage Model Zoo.Returns-------List[CiteEntry]List of citation entries."""return [N2N_REF] | 1 | 2 | 1 | 15 | 0 | 93 | 104 | 93 | self | [] | list[CiteEntry] | {"Expr": 1, "Return": 1} | 0 | 12 | 0 | [] | 0 | [] | The function (get_algorithm_citations) defined within the public class called N2NAlgorithm, that inherit another class.The function start at line 93 and ends at 104. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | N2NAlgorithm | public | 0 | 1 | get_algorithm_description | def get_algorithm_description(self) -> str:"""Get the algorithm description.Returns-------strAlgorithm description."""return N2N_DESCRIPTION | 1 | 2 | 1 | 10 | 0 | 106 | 115 | 106 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 0 | [] | The function (get_algorithm_description) defined within the public class called N2NAlgorithm, that inherit another class.The function start at line 106 and ends at 115. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | N2VAlgorithm | public | 0 | 1 | validate_n2v2 | def validate_n2v2(self) -> Self:"""Validate that the N2V2 strategy and models are set correctly.Returns-------SelfThe validateed configuration.Raises------ValueErrorIf N2V2 is used with the wrong pixel manipulation strategy."""if self.model.n2v2:if self.n2v_config.strategy != SupportedPixelManipulation.MEDIAN.value:rai... | 4 | 18 | 1 | 69 | 0 | 109 | 138 | 109 | self | [] | Self | {"Expr": 1, "If": 3, "Return": 1} | 3 | 30 | 3 | ["ValueError", "ValueError", "model_validator"] | 0 | [] | The function (validate_n2v2) defined within the public class called N2VAlgorithm, that inherit another class.The function start at line 109 and ends at 138. It contains 18 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 3.0 func... |
CAREamics_careamics | N2VAlgorithm | public | 0 | 1 | set_n2v2 | def set_n2v2(self, use_n2v2: bool) -> None:"""Set the configuration to use N2V2 or the vanilla Noise2Void.This method ensures that N2V2 is set correctly and remain coherent, as opposedto setting the different parameters individually.Parameters----------use_n2v2 : boolWhether to use N2V2."""if use_n2v2:self.n2v_config.s... | 2 | 7 | 2 | 53 | 0 | 140 | 157 | 140 | self,use_n2v2 | [] | None | {"Assign": 4, "Expr": 1, "If": 1} | 0 | 18 | 0 | [] | 0 | [] | The function (set_n2v2) defined within the public class called N2VAlgorithm, that inherit another class.The function start at line 140 and ends at 157. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [140.0] and does not return any value.. |
CAREamics_careamics | N2VAlgorithm | public | 0 | 1 | is_struct_n2v | def is_struct_n2v(self) -> bool:"""Check if the configuration is using structN2V.Returns-------boolWhether the configuration is using structN2V."""return self.n2v_config.struct_mask_axis != SupportedStructAxis.NONE.value | 1 | 2 | 1 | 20 | 0 | 159 | 167 | 159 | self | [] | bool | {"Expr": 1, "Return": 1} | 0 | 9 | 0 | [] | 0 | [] | The function (is_struct_n2v) defined within the public class called N2VAlgorithm, that inherit another class.The function start at line 159 and ends at 167. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | N2VAlgorithm | public | 0 | 1 | get_algorithm_friendly_name | def get_algorithm_friendly_name(self) -> str:"""Get the friendly name of the algorithm.Returns-------strFriendly name."""use_n2v2 = self.model.n2v2use_structN2V = self.is_struct_n2v()if use_n2v2 and use_structN2V:return STRUCT_N2V2elif use_n2v2:return N2V2elif use_structN2V:return STRUCT_N2Velse:return N2V | 5 | 11 | 1 | 43 | 0 | 169 | 188 | 169 | self | [] | str | {"Assign": 2, "Expr": 1, "If": 3, "Return": 4} | 1 | 20 | 1 | ["self.is_struct_n2v"] | 0 | [] | The function (get_algorithm_friendly_name) defined within the public class called N2VAlgorithm, that inherit another class.The function start at line 169 and ends at 188. It contains 11 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It dec... |
CAREamics_careamics | N2VAlgorithm | public | 0 | 1 | get_algorithm_keywords | def get_algorithm_keywords(self) -> list[str]:"""Get algorithm keywords.Returns-------list[str]List of keywords."""use_n2v2 = self.model.n2v2use_structN2V = self.is_struct_n2v()keywords = ["denoising","restoration","UNet","3D" if self.model.is_3D() else "2D","CAREamics","pytorch",N2V,]if use_n2v2:keywords.append(N2V2)i... | 4 | 17 | 1 | 73 | 0 | 190 | 217 | 190 | self | [] | list[str] | {"Assign": 3, "Expr": 3, "If": 2, "Return": 1} | 4 | 28 | 4 | ["self.is_struct_n2v", "self.model.is_3D", "keywords.append", "keywords.append"] | 0 | [] | The function (get_algorithm_keywords) defined within the public class called N2VAlgorithm, that inherit another class.The function start at line 190 and ends at 217. It contains 17 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares... |
CAREamics_careamics | N2VAlgorithm | public | 0 | 1 | get_algorithm_references | def get_algorithm_references(self) -> str:"""Get the algorithm references.This is used to generate the README of the BioImage Model Zoo export.Returns-------strAlgorithm references."""use_n2v2 = self.model.n2v2use_structN2V = self.is_struct_n2v()references = [N2V_REF.text + " doi: " + N2V_REF.doi,N2V2_REF.text + " doi:... | 5 | 18 | 1 | 109 | 0 | 219 | 249 | 219 | self | [] | str | {"Assign": 3, "Expr": 3, "If": 3, "Return": 4} | 6 | 31 | 6 | ["self.is_struct_n2v", "join", "references.pop", "join", "references.pop", "join"] | 0 | [] | The function (get_algorithm_references) defined within the public class called N2VAlgorithm, that inherit another class.The function start at line 219 and ends at 249. It contains 18 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declar... |
CAREamics_careamics | N2VAlgorithm | public | 0 | 1 | get_algorithm_citations | def get_algorithm_citations(self) -> list[CiteEntry]:"""Return a list of citation entries of the current algorithm.This is used to generate the model description for the BioImage Model Zoo.Returns-------List[CiteEntry]List of citation entries."""use_n2v2 = self.model.n2v2use_structN2V = self.is_struct_n2v()references =... | 3 | 9 | 1 | 50 | 0 | 251 | 273 | 251 | self | [] | list[CiteEntry] | {"Assign": 3, "Expr": 3, "If": 2, "Return": 1} | 3 | 23 | 3 | ["self.is_struct_n2v", "references.append", "references.append"] | 0 | [] | The function (get_algorithm_citations) defined within the public class called N2VAlgorithm, that inherit another class.The function start at line 251 and ends at 273. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares... |
CAREamics_careamics | N2VAlgorithm | public | 0 | 1 | get_algorithm_description | def get_algorithm_description(self) -> str:"""Return a description of the algorithm.This method is used to generate the README of the BioImage Model Zoo export.Returns-------strDescription of the algorithm."""use_n2v2 = self.model.n2v2use_structN2V = self.is_struct_n2v()if use_n2v2 and use_structN2V:return STR_N2V2_DES... | 5 | 11 | 1 | 43 | 0 | 275 | 296 | 275 | self | [] | str | {"Assign": 2, "Expr": 1, "If": 3, "Return": 4} | 1 | 22 | 1 | ["self.is_struct_n2v"] | 0 | [] | The function (get_algorithm_description) defined within the public class called N2VAlgorithm, that inherit another class.The function start at line 275 and ends at 296. It contains 11 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It decla... |
CAREamics_careamics | UNetBasedAlgorithm | public | 0 | 1 | __str__ | def __str__(self) -> str:"""Pretty string representing the configuration.Returns-------strPretty string."""return pformat(self.model_dump()) | 1 | 2 | 1 | 17 | 0 | 69 | 77 | 69 | self | [] | str | {"Expr": 1, "Return": 1} | 2 | 9 | 2 | ["pformat", "self.model_dump"] | 19 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.models_py.NormalProxy.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.mod... | The function (__str__) defined within the public class called UNetBasedAlgorithm, that inherit another class.The function start at line 69 and ends at 77. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functio... |
CAREamics_careamics | UNetBasedAlgorithm | public | 0 | 1 | get_compatible_algorithms | def get_compatible_algorithms(cls) -> list[str]:"""Get the list of compatible algorithms.Returns-------list of strList of compatible algorithms."""return ["n2v", "care", "n2n"] | 1 | 2 | 1 | 19 | 0 | 80 | 88 | 80 | cls | [] | list[str] | {"Expr": 1, "Return": 1} | 0 | 9 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.lightning.lightning_module_py.create_careamics_module"] | The function (get_compatible_algorithms) defined within the public class called UNetBasedAlgorithm, that inherit another class.The function start at line 80 and ends at 88. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It ha... |
CAREamics_careamics | VAEBasedAlgorithm | public | 0 | 1 | algorithm_cross_validation | def algorithm_cross_validation(self: Self) -> Self:"""Validate the algorithm model based on `algorithm`.Returns-------SelfThe validated model."""# hdn# TODO move to designated configurationsif self.algorithm == SupportedAlgorithm.HDN:if self.loss.loss_type != SupportedLoss.HDN:raise ValueError(f"Algorithm {self.algorit... | 10 | 31 | 1 | 142 | 0 | 61 | 103 | 61 | self | [] | Self | {"Expr": 1, "If": 7, "Return": 1} | 6 | 43 | 6 | ["ValueError", "ValueError", "ValueError", "ValueError", "ValueError", "model_validator"] | 0 | [] | The function (algorithm_cross_validation) defined within the public class called VAEBasedAlgorithm, that inherit another class.The function start at line 61 and ends at 103. It contains 31 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value. It... |
CAREamics_careamics | VAEBasedAlgorithm | public | 0 | 1 | output_channels_validation | def output_channels_validation(self: Self) -> Self:"""Validate the consistency between number of out channels and noise models.Returns-------SelfThe validated model."""if self.noise_model is not None:assert self.model.output_channels == len(self.noise_model.noise_models), (f"Number of output channels ({self.model.outpu... | 3 | 12 | 1 | 65 | 0 | 106 | 125 | 106 | self | [] | Self | {"Expr": 1, "If": 2, "Return": 1} | 3 | 20 | 3 | ["len", "len", "model_validator"] | 0 | [] | The function (output_channels_validation) defined within the public class called VAEBasedAlgorithm, that inherit another class.The function start at line 106 and ends at 125. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It... |
CAREamics_careamics | VAEBasedAlgorithm | public | 0 | 1 | predict_logvar_validation | def predict_logvar_validation(self: Self) -> Self:"""Validate the consistency of `predict_logvar` throughout the model.Returns-------SelfThe validated model."""if self.gaussian_likelihood is not None:assert (self.model.predict_logvar == self.gaussian_likelihood.predict_logvar), (f"Model `predict_logvar` ({self.model.pr... | 2 | 10 | 1 | 43 | 0 | 128 | 154 | 128 | self | [] | Self | {"Expr": 1, "If": 1, "Return": 1} | 1 | 27 | 1 | ["model_validator"] | 0 | [] | The function (predict_logvar_validation) defined within the public class called VAEBasedAlgorithm, that inherit another class.The function start at line 128 and ends at 154. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It ... |
CAREamics_careamics | VAEBasedAlgorithm | public | 0 | 1 | __str__ | def __str__(self) -> str:"""Pretty string representing the configuration.Returns-------strPretty string."""return pformat(self.model_dump()) | 1 | 2 | 1 | 17 | 0 | 156 | 164 | 156 | self | [] | str | {"Expr": 1, "Return": 1} | 2 | 9 | 2 | ["pformat", "self.model_dump"] | 19 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.models_py.NormalProxy.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.mod... | The function (__str__) defined within the public class called VAEBasedAlgorithm, that inherit another class.The function start at line 156 and ends at 164. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functi... |
CAREamics_careamics | VAEBasedAlgorithm | public | 0 | 1 | get_compatible_algorithms | def get_compatible_algorithms(cls) -> list[str]:"""Get the list of compatible algorithms.Returns-------list of strList of compatible algorithms."""return ["hdn", "microsplit"] | 1 | 2 | 1 | 17 | 0 | 167 | 175 | 167 | cls | [] | list[str] | {"Expr": 1, "Return": 1} | 0 | 9 | 0 | [] | 0 | [] | The function (get_compatible_algorithms) defined within the public class called VAEBasedAlgorithm, that inherit another class.The function start at line 167 and ends at 175. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | ArchitectureModel | public | 0 | 1 | model_dump | def model_dump(self, **kwargs: Any) -> dict[str, Any]:"""Dump the model as a dictionary, ignoring the architecture keyword.Parameters----------**kwargs : AnyAdditional keyword arguments from Pydantic BaseModel model_dump method.Returns-------{str: Any}Model as a dictionary."""model_dict = super().model_dump(**kwargs)# ... | 1 | 4 | 2 | 37 | 0 | 18 | 37 | 18 | self,**kwargs | [] | dict[str, Any] | {"Assign": 1, "Expr": 2, "Return": 1} | 3 | 20 | 3 | ["model_dump", "super", "model_dict.pop"] | 26 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70411402_jeertmans_manim_slides.tests.test_wizard_py.test_init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70411402_jeertmans_manim_slides.tests.test_wizard_py.test_init_custom_path", "_.content.gdrive.MyDrive.P... | The function (model_dump) defined within the public class called ArchitectureModel, that inherit another class.The function start at line 18 and ends at 37. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [18.0] and does not return any value. It declares 3.0 fu... |
CAREamics_careamics | LVAEModel | public | 0 | 1 | validate_conv_strides | def validate_conv_strides(self: Self) -> Self:"""Validate the convolutional strides.Returns-------listValidated strides.Raises------ValueErrorIf the number of strides is not 2."""if len(self.encoder_conv_strides) < 2 or len(self.encoder_conv_strides) > 3:raise ValueError(f"Strides must be 2 or 3 (got {len(self.encoder_... | 11 | 28 | 1 | 145 | 0 | 46 | 92 | 46 | self | [] | Self | {"Expr": 1, "If": 5, "Return": 1} | 22 | 47 | 22 | ["len", "len", "ValueError", "len", "len", "len", "ValueError", "len", "len", "len", "ValueError", "len", "len", "len", "len", "ValueError", "len", "len", "any", "any", "ValueError", "model_validator"] | 0 | [] | The function (validate_conv_strides) defined within the public class called LVAEModel, that inherit another class.The function start at line 46 and ends at 92. It contains 28 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value. It declares 22.0... |
CAREamics_careamics | LVAEModel | public | 0 | 1 | validate_input_shape | def validate_input_shape(cls, input_shape: list) -> list:"""Validate the input shape.Parameters----------input_shape : listShape of the input patch.Returns-------listValidated input shape.Raises------ValueErrorIf the number of dimensions is not 3 or 4."""if len(input_shape) < 2 or len(input_shape) > 3:raise ValueError(... | 7 | 17 | 2 | 82 | 0 | 96 | 133 | 96 | cls,input_shape | [] | list | {"Expr": 1, "If": 3, "Return": 1} | 9 | 38 | 9 | ["len", "len", "ValueError", "len", "any", "ValueError", "any", "ValueError", "field_validator"] | 0 | [] | The function (validate_input_shape) defined within the public class called LVAEModel, that inherit another class.The function start at line 96 and ends at 133. It contains 17 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [96.0] and does not return any value. It declares 9.... |
CAREamics_careamics | LVAEModel | public | 0 | 1 | validate_encoder_even | def validate_encoder_even(cls, encoder_n_filters: int) -> int:"""Validate that num_channels_init is even.Parameters----------encoder_n_filters : intNumber of channels.Returns-------intValidated number of channels.Raises------ValueErrorIf the number of channels is odd."""# if oddif encoder_n_filters % 2 != 0:raise Value... | 2 | 7 | 2 | 29 | 0 | 137 | 163 | 137 | cls,encoder_n_filters | [] | int | {"Expr": 1, "If": 1, "Return": 1} | 2 | 27 | 2 | ["ValueError", "field_validator"] | 0 | [] | The function (validate_encoder_even) defined within the public class called LVAEModel, that inherit another class.The function start at line 137 and ends at 163. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [137.0] and does not return any value. It declares ... |
CAREamics_careamics | LVAEModel | public | 0 | 1 | validate_decoder_even | def validate_decoder_even(cls, decoder_n_filters: int) -> int:"""Validate that num_channels_init is even.Parameters----------decoder_n_filters : intNumber of channels.Returns-------intValidated number of channels.Raises------ValueErrorIf the number of channels is odd."""# if oddif decoder_n_filters % 2 != 0:raise Value... | 2 | 7 | 2 | 29 | 0 | 167 | 193 | 167 | cls,decoder_n_filters | [] | int | {"Expr": 1, "If": 1, "Return": 1} | 2 | 27 | 2 | ["ValueError", "field_validator"] | 0 | [] | The function (validate_decoder_even) defined within the public class called LVAEModel, that inherit another class.The function start at line 167 and ends at 193. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [167.0] and does not return any value. It declares ... |
CAREamics_careamics | LVAEModel | public | 0 | 1 | validate_z_dims | def validate_z_dims(cls, z_dims: tuple) -> tuple:"""Validate the z_dims.Parameters----------z_dims : tupleTuple of z dimensions.Returns-------tupleValidated z dimensions.Raises------ValueErrorIf the number of z dimensions is not 4."""if len(z_dims) < 2:raise ValueError(f"Number of z dimensions must be at least 2 (got {... | 2 | 6 | 2 | 28 | 0 | 196 | 220 | 196 | cls,z_dims | [] | tuple | {"Expr": 1, "If": 1, "Return": 1} | 4 | 25 | 4 | ["len", "ValueError", "len", "field_validator"] | 0 | [] | The function (validate_z_dims) defined within the public class called LVAEModel, that inherit another class.The function start at line 196 and ends at 220. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [196.0] and does not return any value. It declares 4.0 fu... |
CAREamics_careamics | LVAEModel | public | 0 | 1 | validate_multiscale_count | def validate_multiscale_count(self: Self) -> Self:"""Validate the multiscale count.Returns-------SelfThe validated model."""if self.multiscale_count < 1 or self.multiscale_count > len(self.z_dims) + 1:raise ValueError(f"Multiscale count must be 1 for LC off or less or equal to the number"f" of Z dims + 1 (got {self.mul... | 3 | 7 | 1 | 40 | 0 | 223 | 237 | 223 | self | [] | Self | {"Expr": 1, "If": 1, "Return": 1} | 4 | 15 | 4 | ["len", "ValueError", "len", "model_validator"] | 0 | [] | The function (validate_multiscale_count) defined within the public class called LVAEModel, that inherit another class.The function start at line 223 and ends at 237. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares ... |
CAREamics_careamics | LVAEModel | public | 0 | 1 | set_3D | def set_3D(self, is_3D: bool) -> None:"""Set 3D model by setting the `conv_dims` parameters.Parameters----------is_3D : boolWhether the algorithm is 3D or not."""if is_3D:self.conv_dims = 3else:self.conv_dims = 2 | 2 | 5 | 2 | 27 | 0 | 239 | 251 | 239 | self,is_3D | [] | None | {"Assign": 2, "Expr": 1, "If": 1} | 0 | 13 | 0 | [] | 0 | [] | The function (set_3D) defined within the public class called LVAEModel, that inherit another class.The function start at line 239 and ends at 251. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [239.0] and does not return any value.. |
CAREamics_careamics | LVAEModel | public | 0 | 1 | is_3D | def is_3D(self) -> bool:"""Return whether the model is 3D or not.Returns-------boolWhether the model is 3D or not."""return len(self.input_shape) == 3 | 1 | 2 | 1 | 17 | 0 | 253 | 262 | 253 | self | [] | bool | {"Expr": 1, "Return": 1} | 1 | 10 | 1 | ["len"] | 0 | [] | The function (is_3D) defined within the public class called LVAEModel, that inherit another class.The function start at line 253 and ends at 262. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It... |
CAREamics_careamics | UNetModel | public | 0 | 1 | validate_num_channels_init | def validate_num_channels_init(cls, num_channels_init: int) -> int:"""Validate that num_channels_init is even.Parameters----------num_channels_init : intNumber of channels.Returns-------intValidated number of channels.Raises------ValueErrorIf the number of channels is odd."""# if oddif num_channels_init % 2 != 0:raise ... | 2 | 7 | 2 | 29 | 0 | 71 | 97 | 71 | cls,num_channels_init | [] | int | {"Expr": 1, "If": 1, "Return": 1} | 2 | 27 | 2 | ["ValueError", "field_validator"] | 0 | [] | The function (validate_num_channels_init) defined within the public class called UNetModel, that inherit another class.The function start at line 71 and ends at 97. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [71.0] and does not return any value. It declare... |
CAREamics_careamics | UNetModel | public | 0 | 1 | set_3D | def set_3D(self, is_3D: bool) -> None:"""Set 3D model by setting the `conv_dims` parameters.Parameters----------is_3D : boolWhether the algorithm is 3D or not."""if is_3D:self.conv_dims = 3else:self.conv_dims = 2 | 2 | 5 | 2 | 27 | 0 | 99 | 111 | 99 | self,is_3D | [] | None | {"Assign": 2, "Expr": 1, "If": 1} | 0 | 13 | 0 | [] | 0 | [] | The function (set_3D) defined within the public class called UNetModel, that inherit another class.The function start at line 99 and ends at 111. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [99.0] and does not return any value.. |
CAREamics_careamics | UNetModel | public | 0 | 1 | is_3D | def is_3D(self) -> bool:"""Return whether the model is 3D or not.Returns-------boolWhether the model is 3D or not."""return self.conv_dims == 3 | 1 | 2 | 1 | 14 | 0 | 113 | 122 | 113 | self | [] | bool | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 0 | [] | The function (is_3D) defined within the public class called UNetModel, that inherit another class.The function start at line 113 and ends at 122. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
CAREamics_careamics | public | public | 0 | 0 | np_float_to_scientific_str | def np_float_to_scientific_str(x: float) -> str:"""Return a string scientific representation of a float.In particular, this method is used to serialize floats to strings, allowingnumpy.float32 to be passed in the Pydantic model and written to a yaml file as str.Parameters----------x : floatInput value.Returns-------str... | 1 | 2 | 1 | 21 | 0 | 27 | 43 | 27 | x | [] | str | {"Expr": 1, "Return": 1} | 1 | 17 | 1 | ["np.format_float_scientific"] | 0 | [] | The function (np_float_to_scientific_str) defined within the public class called public.The function start at line 27 and ends at 43. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 fun... |
CAREamics_careamics | DataConfig | public | 0 | 1 | all_elements_power_of_2_minimum_8 | def all_elements_power_of_2_minimum_8(cls, patch_list: Union[list[int]]) -> Union[list[int]]:"""Validate patch size.Patch size must be powers of 2 and minimum 8.Parameters----------patch_list : list of intPatch size.Returns-------list of intValidated patch size.Raises------ValueErrorIf the patch size is smaller than 8.... | 1 | 5 | 2 | 30 | 0 | 146 | 173 | 146 | cls,patch_list | [] | Union[list[int]] | {"Expr": 2, "Return": 1} | 2 | 28 | 2 | ["patch_size_ge_than_8_power_of_2", "field_validator"] | 0 | [] | The function (all_elements_power_of_2_minimum_8) defined within the public class called DataConfig, that inherit another class.The function start at line 146 and ends at 173. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [146.0] and does not return any value.... |
CAREamics_careamics | DataConfig | public | 0 | 1 | axes_valid | def axes_valid(cls, axes: str) -> str:"""Validate axes.Axes must:- be a combination of 'STCZYX'- not contain duplicates- contain at least 2 contiguous axes: X and Y- contain at most 4 axes- not contain both S and T axesParameters----------axes : strAxes to validate.Returns-------strValidated axes.Raises------ValueError... | 1 | 3 | 2 | 18 | 0 | 177 | 206 | 177 | cls,axes | [] | str | {"Expr": 2, "Return": 1} | 2 | 30 | 2 | ["check_axes_validity", "field_validator"] | 0 | [] | The function (axes_valid) defined within the public class called DataConfig, that inherit another class.The function start at line 177 and ends at 206. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [177.0] and does not return any value. It declares 2.0 functi... |
CAREamics_careamics | DataConfig | public | 0 | 1 | set_default_dataloader_params | def set_default_dataloader_params(cls, dataloader_params: dict[str, Any]) -> dict[str, Any]:"""Set default dataloader parameters if not provided.- If 'num_workers' is not set, it defaults to the number of available CPU cores.- If 'pin_memory' is not set, it defaults to True if CUDA is available.Parameters----------data... | 4 | 12 | 2 | 75 | 0 | 210 | 241 | 210 | cls,dataloader_params | [] | dict[str, Any] | {"Assign": 3, "Expr": 1, "If": 3, "Return": 1} | 3 | 32 | 3 | ["os.cpu_count", "torch.cuda.is_available", "field_validator"] | 0 | [] | The function (set_default_dataloader_params) defined within the public class called DataConfig, that inherit another class.The function start at line 210 and ends at 241. It contains 12 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [210.0] and does not return any value. It... |
CAREamics_careamics | DataConfig | public | 0 | 1 | shuffle_train_dataloader | def shuffle_train_dataloader(cls, train_dataloader_params: dict[str, Any]) -> dict[str, Any]:"""Validate that "shuffle" is included in the training dataloader params.A warning will be raised if `shuffle=False`.Parameters----------train_dataloader_params : dict of {str: Any}The training dataloader parameters.Returns----... | 4 | 16 | 2 | 60 | 0 | 245 | 280 | 245 | cls,train_dataloader_params | [] | dict[str, Any] | {"Expr": 2, "If": 2, "Return": 1} | 3 | 36 | 3 | ["ValueError", "warn", "field_validator"] | 0 | [] | The function (shuffle_train_dataloader) defined within the public class called DataConfig, that inherit another class.The function start at line 245 and ends at 280. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [245.0] and does not return any value. It decl... |
CAREamics_careamics | DataConfig | public | 0 | 1 | std_only_with_mean | def std_only_with_mean(self: Self) -> Self:"""Check that mean and std are either both None, or both specified.Returns-------SelfValidated data model.Raises------ValueErrorIf std is not None and mean is None."""# check that mean and std are either both None, or both specifiedif (self.image_means and not self.image_stds)... | 15 | 24 | 1 | 142 | 0 | 283 | 324 | 283 | self | [] | Self | {"Expr": 1, "If": 5, "Return": 1} | 9 | 42 | 9 | ["ValueError", "len", "len", "ValueError", "ValueError", "len", "len", "ValueError", "model_validator"] | 0 | [] | The function (std_only_with_mean) defined within the public class called DataConfig, that inherit another class.The function start at line 283 and ends at 324. It contains 24 lines of code and it has a cyclomatic complexity of 15. The function does not take any parameters and does not return any value. It declares 9.0 ... |
CAREamics_careamics | DataConfig | public | 0 | 1 | validate_dimensions | def validate_dimensions(self: Self) -> Self:"""Validate 2D/3D dimensions between axes, patch size and transforms.Returns-------SelfValidated data model.Raises------ValueErrorIf the transforms are not valid."""if "Z" in self.axes:if len(self.patch_size) != 3:raise ValueError(f"Patch size must have 3 dimensions if the da... | 4 | 14 | 1 | 57 | 0 | 327 | 355 | 327 | self | [] | Self | {"Expr": 1, "If": 3, "Return": 1} | 5 | 29 | 5 | ["len", "ValueError", "len", "ValueError", "model_validator"] | 0 | [] | The function (validate_dimensions) defined within the public class called DataConfig, that inherit another class.The function start at line 327 and ends at 355. It contains 14 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 5.0 ... |
CAREamics_careamics | DataConfig | public | 0 | 1 | __str__ | def __str__(self) -> str:"""Pretty string reprensenting the configuration.Returns-------strPretty string."""return pformat(self.model_dump()) | 1 | 2 | 1 | 17 | 0 | 357 | 366 | 357 | self | [] | str | {"Expr": 1, "Return": 1} | 2 | 10 | 2 | ["pformat", "self.model_dump"] | 19 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.models_py.NormalProxy.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.mod... | The function (__str__) defined within the public class called DataConfig, that inherit another class.The function start at line 357 and ends at 366. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It... |
CAREamics_careamics | DataConfig | public | 0 | 1 | _update | def _update(self, **kwargs: Any) -> None:"""Update multiple arguments at once.Parameters----------**kwargs : AnyKeyword arguments to update."""self.__dict__.update(kwargs)self.__class__.model_validate(self.__dict__) | 1 | 3 | 2 | 31 | 0 | 368 | 378 | 368 | self,**kwargs | [] | None | {"Expr": 3} | 2 | 11 | 2 | ["self.__dict__.update", "self.__class__.model_validate"] | 0 | [] | The function (_update) defined within the public class called DataConfig, that inherit another class.The function start at line 368 and ends at 378. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [368.0] and does not return any value. It declares 2.0 functions... |
CAREamics_careamics | DataConfig | public | 0 | 1 | set_means_and_stds | def set_means_and_stds(self,image_means: Union[NDArray, tuple, list, None],image_stds: Union[NDArray, tuple, list, None],target_means: Union[NDArray, tuple, list, None] | None = None,target_stds: Union[NDArray, tuple, list, None] | None = None,) -> None:"""Set mean and standard deviation of the data across channels.Thi... | 5 | 21 | 5 | 138 | 0 | 380 | 419 | 380 | self,image_means,image_stds,target_means,target_stds | [] | None | {"Assign": 4, "Expr": 2, "If": 4} | 5 | 40 | 5 | ["list", "list", "list", "list", "self._update"] | 0 | [] | The function (set_means_and_stds) defined within the public class called DataConfig, that inherit another class.The function start at line 380 and ends at 419. It contains 21 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [380.0] and does not return any value. It declares 5... |
CAREamics_careamics | DataConfig | public | 0 | 1 | set_3D | def set_3D(self, axes: str, patch_size: list[int]) -> None:"""Set 3D parameters.Parameters----------axes : strAxes.patch_size : list of intPatch size."""self._update(axes=axes, patch_size=patch_size) | 1 | 2 | 3 | 31 | 0 | 421 | 432 | 421 | self,axes,patch_size | [] | None | {"Expr": 2} | 1 | 12 | 1 | ["self._update"] | 0 | [] | The function (set_3D) defined within the public class called DataConfig, that inherit another class.The function start at line 421 and ends at 432. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [421.0] and does not return any value. It declare 1.0 function, a... |
CAREamics_careamics | public | public | 0 | 0 | np_float_to_scientific_str | def np_float_to_scientific_str(x: float) -> str:"""Return a string scientific representation of a float.In particular, this method is used to serialize floats to strings, allowingnumpy.float32 to be passed in the Pydantic model and written to a yaml file as str.Parameters----------x : floatInput value.Returns-------str... | 1 | 2 | 1 | 21 | 0 | 40 | 56 | 40 | x | [] | str | {"Expr": 1, "Return": 1} | 1 | 17 | 1 | ["np.format_float_scientific"] | 0 | [] | The function (np_float_to_scientific_str) defined within the public class called public.The function start at line 40 and ends at 56. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 fun... |
CAREamics_careamics | NGDataConfig | public | 0 | 1 | axes_valid | def axes_valid(cls, axes: str) -> str:"""Validate axes.Axes must:- be a combination of 'STCZYX'- not contain duplicates- contain at least 2 contiguous axes: X and Y- contain at most 4 axes- not contain both S and T axesParameters----------axes : strAxes to validate.Returns-------strValidated axes.Raises------ValueError... | 1 | 3 | 2 | 18 | 0 | 149 | 178 | 149 | cls,axes | [] | str | {"Expr": 2, "Return": 1} | 2 | 30 | 2 | ["check_axes_validity", "field_validator"] | 0 | [] | The function (axes_valid) defined within the public class called NGDataConfig, that inherit another class.The function start at line 149 and ends at 178. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [149.0] and does not return any value. It declares 2.0 func... |
CAREamics_careamics | NGDataConfig | public | 0 | 1 | shuffle_train_dataloader | def shuffle_train_dataloader(cls, train_dataloader_params: dict[str, Any]) -> dict[str, Any]:"""Validate that "shuffle" is included in the training dataloader params.A warning will be raised if `shuffle=False`.Parameters----------train_dataloader_params : dict of {str: Any}The training dataloader parameters.Returns----... | 4 | 16 | 2 | 60 | 0 | 182 | 217 | 182 | cls,train_dataloader_params | [] | dict[str, Any] | {"Expr": 2, "If": 2, "Return": 1} | 3 | 36 | 3 | ["ValueError", "warn", "field_validator"] | 0 | [] | The function (shuffle_train_dataloader) defined within the public class called NGDataConfig, that inherit another class.The function start at line 182 and ends at 217. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [182.0] and does not return any value. It de... |
CAREamics_careamics | NGDataConfig | public | 0 | 1 | std_only_with_mean | def std_only_with_mean(self: Self) -> Self:"""Check that mean and std are either both None, or both specified.Returns-------SelfValidated data model.Raises------ValueErrorIf std is not None and mean is None."""# check that mean and std are either both None, or both specifiedif (self.image_means and not self.image_stds)... | 15 | 24 | 1 | 142 | 0 | 220 | 261 | 220 | self | [] | Self | {"Expr": 1, "If": 5, "Return": 1} | 9 | 42 | 9 | ["ValueError", "len", "len", "ValueError", "ValueError", "len", "len", "ValueError", "model_validator"] | 0 | [] | The function (std_only_with_mean) defined within the public class called NGDataConfig, that inherit another class.The function start at line 220 and ends at 261. It contains 24 lines of code and it has a cyclomatic complexity of 15. The function does not take any parameters and does not return any value. It declares 9.... |
CAREamics_careamics | NGDataConfig | public | 0 | 1 | validate_dimensions | def validate_dimensions(self: Self) -> Self:"""Validate 2D/3D dimensions between axes and patch size.Returns-------SelfValidated data model.Raises------ValueErrorIf the patch size dimension is not compatible with the axes."""if "Z" in self.axes:if (hasattr(self.patching, "patch_size")and len(self.patching.patch_size) !... | 6 | 20 | 1 | 83 | 0 | 264 | 297 | 264 | self | [] | Self | {"Expr": 1, "If": 3, "Return": 1} | 7 | 34 | 7 | ["hasattr", "len", "ValueError", "hasattr", "len", "ValueError", "model_validator"] | 0 | [] | The function (validate_dimensions) defined within the public class called NGDataConfig, that inherit another class.The function start at line 264 and ends at 297. It contains 20 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 7.... |
CAREamics_careamics | NGDataConfig | public | 0 | 1 | __str__ | def __str__(self) -> str:"""Pretty string reprensenting the configuration.Returns-------strPretty string."""return pformat(self.model_dump()) | 1 | 2 | 1 | 17 | 0 | 299 | 308 | 299 | self | [] | str | {"Expr": 1, "Return": 1} | 2 | 10 | 2 | ["pformat", "self.model_dump"] | 19 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.models_py.NormalProxy.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.mod... | The function (__str__) defined within the public class called NGDataConfig, that inherit another class.The function start at line 299 and ends at 308. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, ... |
CAREamics_careamics | NGDataConfig | public | 0 | 1 | _update | def _update(self, **kwargs: Any) -> None:"""Update multiple arguments at once.Parameters----------**kwargs : AnyKeyword arguments to update."""self.__dict__.update(kwargs)self.__class__.model_validate(self.__dict__) | 1 | 3 | 2 | 31 | 0 | 310 | 320 | 310 | self,**kwargs | [] | None | {"Expr": 3} | 2 | 11 | 2 | ["self.__dict__.update", "self.__class__.model_validate"] | 0 | [] | The function (_update) defined within the public class called NGDataConfig, that inherit another class.The function start at line 310 and ends at 320. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [310.0] and does not return any value. It declares 2.0 functio... |
CAREamics_careamics | NGDataConfig | public | 0 | 1 | set_means_and_stds | def set_means_and_stds(self,image_means: Union[NDArray, tuple, list, None],image_stds: Union[NDArray, tuple, list, None],target_means: Union[NDArray, tuple, list, None] | None = None,target_stds: Union[NDArray, tuple, list, None] | None = None,) -> None:"""Set mean and standard deviation of the data across channels.Thi... | 5 | 21 | 5 | 138 | 0 | 322 | 361 | 322 | self,image_means,image_stds,target_means,target_stds | [] | None | {"Assign": 4, "Expr": 2, "If": 4} | 5 | 40 | 5 | ["list", "list", "list", "list", "self._update"] | 0 | [] | The function (set_means_and_stds) defined within the public class called NGDataConfig, that inherit another class.The function start at line 322 and ends at 361. It contains 21 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [322.0] and does not return any value. It declares... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.