Coverage report: 97%

Files Functions Classes

coverage.py v7.13.4, created at 2026-02-22 19:38 -0700

File function   statements missing excluded   coverage
tests / unit / no_torch / test_bool_array.py test_list_bool_array   6 0 0   100%
tests / unit / no_torch / test_bool_array.py test_np_bool_array   8 0 0   100%
tests / unit / no_torch / test_bool_array.py (no function)   17 0 0   100%
tests / unit / no_torch / test_dataframe_serialization.py test_dataframe_detection_logic   3 0 0   100%
tests / unit / no_torch / test_dataframe_serialization.py test_small_dataframe_roundtrip   7 0 0   100%
tests / unit / no_torch / test_dataframe_serialization.py test_single_row_dataframe   8 0 0   100%
tests / unit / no_torch / test_dataframe_serialization.py test_empty_dataframe   8 0 0   100%
tests / unit / no_torch / test_dataframe_serialization.py test_dataframe_dtype_preservation   10 0 0   100%
tests / unit / no_torch / test_dataframe_serialization.py test_dataframe_with_nan_values   9 0 0   100%
tests / unit / no_torch / test_dataframe_serialization.py test_dataframe_special_column_names   8 0 0   100%
tests / unit / no_torch / test_dataframe_serialization.py (no function)   13 0 0   100%
tests / unit / no_torch / test_isolate_zanj_handler_store.py test_Basic   6 0 0   100%
tests / unit / no_torch / test_isolate_zanj_handler_store.py test_isolate_handlers   13 0 0   100%
tests / unit / no_torch / test_isolate_zanj_handler_store.py (no function)   28 1 0   96%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_basic   7 0 0   100%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_numpy_array   7 0 0   100%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_serializable_dataclass   12 0 0   100%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_nested_container   10 0 0   100%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_unknown_format   5 0 0   100%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_with_external_reference   8 0 0   100%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_error_modes   16 0 0   100%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_error_modes.CustomHandler.check   1 1 0   0%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_error_modes.CustomHandler.load   1 0 0   100%
tests / unit / no_torch / test_load_item_recursive.py test_load_item_recursive_error_modes.mock_get_item_loader   1 0 0   100%
tests / unit / no_torch / test_load_item_recursive.py (no function)   18 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestPopulateExternalsErrorChecking.test_external_item_missing_data_field   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestPopulateExternalsErrorChecking.test_sequence_with_non_int_key   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestPopulateExternalsErrorChecking.test_sequence_with_out_of_range_key   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestPopulateExternalsErrorChecking.test_mapping_with_non_str_key   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestPopulateExternalsErrorChecking.test_mapping_with_missing_key   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestPopulateExternalsErrorChecking.test_invalid_item_type   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestPopulateExternalsErrorChecking.test_valid_sequence_access   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestPopulateExternalsErrorChecking.test_valid_mapping_access   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestPopulateExternalsErrorChecking.test_external_item_with_data_returns_true   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_missing_serialize_method   6 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_missing_serialize_method.MissingSerialize.load   1 1 0   0%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_missing_load_method   5 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_missing_load_method.MissingLoad.serialize   1 1 0   0%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_missing_format_key   6 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_missing_format_key.MissingFormat.serialize   1 1 0   0%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_missing_format_key.MissingFormat.load   1 1 0   0%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_non_string_format_key   7 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_non_string_format_key.NonStringFormat.serialize   1 1 0   0%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_non_string_format_key.NonStringFormat.load   1 1 0   0%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_valid_formatted_class   8 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_valid_formatted_class.ValidClass.serialize   1 1 0   0%
tests / unit / no_torch / test_loading_edge_cases.py TestLoaderHandlerFromFormattedClass.test_valid_formatted_class.ValidClass.load   1 1 0   0%
tests / unit / no_torch / test_loading_edge_cases.py TestGetItemLoader.test_non_string_format_key   3 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestLoadItemRecursive.test_unloadable_type_strict_mode   5 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py TestLoadItemRecursive.test_unloadable_type_permissive_mode   5 0 0   100%
tests / unit / no_torch / test_loading_edge_cases.py (no function)   25 0 0   100%
tests / unit / no_torch / test_serializing_edge_cases.py TestZanjExternalSerialize.test_duplicate_external_path   6 0 0   100%
tests / unit / no_torch / test_serializing_edge_cases.py TestZanjExternalSerialize.test_path_prefix_conflict_child_first   6 0 0   100%
tests / unit / no_torch / test_serializing_edge_cases.py TestZanjExternalSerialize.test_path_prefix_conflict_parent_first   6 0 0   100%
tests / unit / no_torch / test_serializing_edge_cases.py TestZanjExternalSerialize.test_invalid_npy_data_type   3 0 0   100%
tests / unit / no_torch / test_serializing_edge_cases.py TestZanjExternalSerialize.test_invalid_jsonl_data_type   6 0 0   100%
tests / unit / no_torch / test_serializing_edge_cases.py TestZanjExternalSerialize.test_valid_npy_serialization   6 0 0   100%
tests / unit / no_torch / test_serializing_edge_cases.py TestZanjExternalSerialize.test_valid_jsonl_list_serialization   6 0 0   100%
tests / unit / no_torch / test_serializing_edge_cases.py TestZanjExternalSerialize.test_non_overlapping_paths_allowed   7 0 0   100%
tests / unit / no_torch / test_serializing_edge_cases.py (no function)   14 0 0   100%
tests / unit / no_torch / test_shared_prefix_keys.py test_shared_prefix_keys   14 0 0   100%
tests / unit / no_torch / test_shared_prefix_keys.py (no function)   8 0 0   100%
tests / unit / no_torch / test_zanj_basic.py array_meta   3 0 0   100%
tests / unit / no_torch / test_zanj_basic.py test_numpy   13 0 0   100%
tests / unit / no_torch / test_zanj_basic.py test_jsonl   7 0 0   100%
tests / unit / no_torch / test_zanj_basic.py test_polars_dataframe   8 0 0   100%
tests / unit / no_torch / test_zanj_basic.py test_polars_dataframe_empty   9 0 0   100%
tests / unit / no_torch / test_zanj_basic.py test_polars_dataframe_large   9 0 0   100%
tests / unit / no_torch / test_zanj_basic.py test_polars_with_nulls   8 0 0   100%
tests / unit / no_torch / test_zanj_basic.py (no function)   16 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_with_different_configs   22 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_compression_options   22 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_error_modes   9 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_error_modes.ForceExceptionOnSerialize.__repr__   1 1 0   0%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_error_modes.ExceptionForcingZANJ.json_serialize   3 1 0   67%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_array_modes   13 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_meta   13 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_externals_info   8 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_save_extension   16 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_file_not_found   8 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py test_zanj_create_directory   14 0 0   100%
tests / unit / no_torch / test_zanj_edge_cases.py (no function)   18 0 0   100%
tests / unit / no_torch / test_zanj_populate_nested.py test_nested_populate   7 0 0   100%
tests / unit / no_torch / test_zanj_populate_nested.py (no function)   17 0 0   100%
tests / unit / no_torch / test_zanj_serializable_dataclass.py test_Basic   6 0 0   100%
tests / unit / no_torch / test_zanj_serializable_dataclass.py test_Nested   6 0 0   100%
tests / unit / no_torch / test_zanj_serializable_dataclass.py test_Nested_with_container   6 0 0   100%
tests / unit / no_torch / test_zanj_serializable_dataclass.py test_sdc_with_np_array_small   6 0 0   100%
tests / unit / no_torch / test_zanj_serializable_dataclass.py test_sdc_with_np_array   6 0 0   100%
tests / unit / no_torch / test_zanj_serializable_dataclass.py test_sdc_with_df   6 0 0   100%
tests / unit / no_torch / test_zanj_serializable_dataclass.py test_sdc_container_explicit   6 0 0   100%
tests / unit / no_torch / test_zanj_serializable_dataclass.py (no function)   49 0 0   100%
tests / unit / with_torch / test_bool_array_torch.py test_torch_bool_array   8 0 0   100%
tests / unit / with_torch / test_bool_array_torch.py (no function)   11 0 0   100%
tests / unit / with_torch / test_get_module_device.py test_get_module_device_single_device   6 0 0   100%
tests / unit / with_torch / test_get_module_device.py test_get_module_device_multiple_devices   16 1 0   94%
tests / unit / with_torch / test_get_module_device.py test_get_module_device_no_parameters   4 0 0   100%
tests / unit / with_torch / test_get_module_device.py (no function)   7 0 0   100%
tests / unit / with_torch / test_sdc_torch.py test_sdc_tensor_small   6 0 0   100%
tests / unit / with_torch / test_sdc_torch.py test_sdc_tensor   6 0 0   100%
tests / unit / with_torch / test_sdc_torch.py sdc_complicated.__eq__   1 1 0   0%
tests / unit / with_torch / test_sdc_torch.py test_sdc_complicated   6 0 0   100%
tests / unit / with_torch / test_sdc_torch.py (no function)   40 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_num_params   8 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_get_module_device_empty   7 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_get_module_device_empty.EmptyModule.__init__   1 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_get_module_device_empty.EmptyModule.forward   1 1 0   0%
tests / unit / with_torch / test_torch_edge_cases.py test_load_state_dict_wrapper   16 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_load_state_dict_wrapper.SimpleModel.__init__   2 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_load_state_dict_wrapper.SimpleModel.forward   1 1 0   0%
tests / unit / with_torch / test_torch_edge_cases.py test_load_state_dict_wrapper.SimpleModel._load_state_dict_wrapper   2 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_deprecated_load_file   13 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_deprecated_load_file.SimpleModel.__init__   2 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_deprecated_load_file.SimpleModel.forward   1 1 0   0%
tests / unit / with_torch / test_torch_edge_cases.py test_configmodel_training_records   16 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_configmodel_training_records.SimpleModel.__init__   3 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_configmodel_training_records.SimpleModel.forward   1 1 0   0%
tests / unit / with_torch / test_torch_edge_cases.py test_configmodel_with_custom_settings   14 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_configmodel_with_custom_settings.CustomStateModel.__init__   3 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py test_configmodel_with_custom_settings.CustomStateModel.forward   1 1 0   0%
tests / unit / with_torch / test_torch_edge_cases.py test_configmodel_with_custom_settings.CustomStateModel._load_state_dict_wrapper   2 0 0   100%
tests / unit / with_torch / test_torch_edge_cases.py (no function)   14 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py EdgeCaseTestModel.__init__   2 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py EdgeCaseTestModel.forward   1 1 0   0%
tests / unit / with_torch / test_torchutil_edge_cases.py TestConfiguredModelValidation.test_missing_config_class_decorator   4 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestConfiguredModelValidation.test_missing_config_class_decorator.UnconfiguredModel.__init__   1 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestConfiguredModelValidation.test_wrong_config_type   4 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestConfiguredModelValidation.test_config_not_serializable_dataclass   2 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestSetConfigClass.test_invalid_config_class_type   6 2 0   67%
tests / unit / with_torch / test_torchutil_edge_cases.py TestConfiguredModelSaveLoad.test_save_with_default_zanj   7 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestConfiguredModelSaveLoad.test_load_with_default_zanj   7 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestConfiguredModelSaveLoad.test_serialize_with_default_zanj   6 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestNumParamsWrapper.test_num_params_instance_method   6 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestAssertModelExactEquality.test_state_dict_mismatch   8 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestAssertModelExactEquality.test_equal_models_pass   5 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestAssertModelExactEquality.test_state_dict_keys_mismatch   9 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestAssertModelExactEquality.test_state_dict_keys_mismatch.DifferentModel.__init__   2 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py TestAssertModelExactEquality.test_state_dict_keys_mismatch.DifferentModel.forward   1 1 0   0%
tests / unit / with_torch / test_torchutil_edge_cases.py TestConfiguredModelReadRoundTrip.test_full_round_trip   10 0 0   100%
tests / unit / with_torch / test_torchutil_edge_cases.py (no function)   34 0 0   100%
tests / unit / with_torch / test_zanj_sdc_modelcfg.py CustomCfg.__init__   2 0 0   100%
tests / unit / with_torch / test_zanj_sdc_modelcfg.py CustomCfg.__eq__   1 0 0   100%
tests / unit / with_torch / test_zanj_sdc_modelcfg.py CustomCfg.serialize   1 0 0   100%
tests / unit / with_torch / test_zanj_sdc_modelcfg.py CustomCfg.load   1 0 0   100%
tests / unit / with_torch / test_zanj_sdc_modelcfg.py test_config_holder   11 0 0   100%
tests / unit / with_torch / test_zanj_sdc_modelcfg.py test_config_holder_zanj   9 0 0   100%
tests / unit / with_torch / test_zanj_sdc_modelcfg.py test_adv_config_holder   6 0 0   100%
tests / unit / with_torch / test_zanj_sdc_modelcfg.py test_adv_config_holder_zanj   6 0 0   100%
tests / unit / with_torch / test_zanj_sdc_modelcfg.py (no function)   53 0 0   100%
tests / unit / with_torch / test_zanj_torch.py test_torch_configmodel_minimal   26 0 0   100%
tests / unit / with_torch / test_zanj_torch.py test_torch_configmodel_minimal.MyNN.__init__   2 0 0   100%
tests / unit / with_torch / test_zanj_torch.py test_torch_configmodel_minimal.MyNN.forward   1 1 0   0%
tests / unit / with_torch / test_zanj_torch.py test_torch_configmodel   41 0 0   100%
tests / unit / with_torch / test_zanj_torch.py test_torch_configmodel.MyGPTConfig.loss   1 1 0   0%
tests / unit / with_torch / test_zanj_torch.py test_torch_configmodel.MyGPTConfig.optim   1 1 0   0%
tests / unit / with_torch / test_zanj_torch.py test_torch_configmodel.MyGPT.__init__   2 0 0   100%
tests / unit / with_torch / test_zanj_torch.py test_torch_configmodel.MyGPT.forward   1 1 0   0%
tests / unit / with_torch / test_zanj_torch.py (no function)   13 0 0   100%
tests / unit / with_torch / test_zanj_torch_cfgmismatch.py MyGPT.__init__   2 0 0   100%
tests / unit / with_torch / test_zanj_torch_cfgmismatch.py MyGPT.forward   1 1 0   0%
tests / unit / with_torch / test_zanj_torch_cfgmismatch.py test_config_mismatch_exception_direct   5 0 0   100%
tests / unit / with_torch / test_zanj_torch_cfgmismatch.py test_equal_configs   4 0 0   100%
tests / unit / with_torch / test_zanj_torch_cfgmismatch.py test_unequal_configs   9 1 0   89%
tests / unit / with_torch / test_zanj_torch_cfgmismatch.py test_unequal_configs_2   9 1 0   89%
tests / unit / with_torch / test_zanj_torch_cfgmismatch.py test_incorrect_instance   7 0 0   100%
tests / unit / with_torch / test_zanj_torch_cfgmismatch.py (no function)   22 0 0   100%
zanj / __init__.py (no function)   4 0 0   100%
zanj / consts.py (no function)   7 2 0   71%
zanj / externals.py load_jsonl   1 0 0   100%
zanj / externals.py load_npy   1 0 0   100%
zanj / externals.py GET_EXTERNAL_LOAD_FUNC   3 1 0   67%
zanj / externals.py (no function)   16 0 0   100%
zanj / loading.py _populate_externals_error_checking   17 0 0   100%
zanj / loading.py LoaderHandler.serialize   1 0 0   100%
zanj / loading.py LoaderHandler.from_formattedclass   7 0 0   100%
zanj / loading.py _torch_loaderhandler_load   7 3 0   57%
zanj / loading.py register_loader_handler   2 0 0   100%
zanj / loading.py get_item_loader   9 0 0   100%
zanj / loading.py load_item_recursive   15 0 0   100%
zanj / loading.py _each_item_in_externals   15 2 0   87%
zanj / loading.py LoadedZANJ.__init__   12 0 0   100%
zanj / loading.py LoadedZANJ.populate_externals   4 0 0   100%
zanj / loading.py (no function)   50 8 0   84%
zanj / serializing.py jsonl_metadata   5 0 0   100%
zanj / serializing.py store_npy   1 0 0   100%
zanj / serializing.py store_jsonl   3 0 0   100%
zanj / serializing.py zanj_external_serialize   40 0 0   100%
zanj / serializing.py (no function)   25 0 0   100%
zanj / torchutil.py num_params   5 0 0   100%
zanj / torchutil.py get_module_device   7 0 0   100%
zanj / torchutil.py ConfiguredModel.__init__   7 0 0   100%
zanj / torchutil.py ConfiguredModel.serialize   4 0 0   100%
zanj / torchutil.py ConfiguredModel.save   3 0 0   100%
zanj / torchutil.py ConfiguredModel._load_state_dict_wrapper   2 0 0   100%
zanj / torchutil.py ConfiguredModel.load   9 1 0   89%
zanj / torchutil.py ConfiguredModel.read   5 0 0   100%
zanj / torchutil.py ConfiguredModel.load_file   2 0 0   100%
zanj / torchutil.py ConfiguredModel.get_handler   2 0 0   100%
zanj / torchutil.py ConfiguredModel.num_params   1 0 0   100%
zanj / torchutil.py set_config_class   4 0 0   100%
zanj / torchutil.py set_config_class.wrapper   3 0 0   100%
zanj / torchutil.py ConfigMismatchException.__init__   2 0 0   100%
zanj / torchutil.py ConfigMismatchException.__str__   1 0 0   100%
zanj / torchutil.py assert_model_cfg_equality   7 0 0   100%
zanj / torchutil.py assert_model_exact_equality   12 0 0   100%
zanj / torchutil.py (no function)   40 2 0   95%
zanj / zanj.py ZANJ.__init__   10 0 0   100%
zanj / zanj.py ZANJ.externals_info   9 1 0   89%
zanj / zanj.py ZANJ.meta   3 0 0   100%
zanj / zanj.py ZANJ.save   18 0 0   100%
zanj / zanj.py ZANJ.read   8 0 0   100%
zanj / zanj.py (no function)   35 0 0   100%
Total     1767 50 0   97%

No items found using the specified filter.