diff --git a/examples/Validation Examples.ipynb b/examples/Validation Examples.ipynb index 889941f..3d842f1 100644 --- a/examples/Validation Examples.ipynb +++ b/examples/Validation Examples.ipynb @@ -117,9 +117,9 @@ "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mIDWrongType\u001b[39m Traceback (most recent call last)", - "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[2]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# Without validation\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m model = \u001b[43mPowerGridModel\u001b[49m\u001b[43m(\u001b[49m\u001b[43merror_data\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 3\u001b[39m output_data = model.calculate_state_estimation(symmetric=\u001b[38;5;28;01mTrue\u001b[39;00m)\n", - "\u001b[36mFile \u001b[39m\u001b[32m/power-grid-model/src/power_grid_model/_core/power_grid_model.py:175\u001b[39m, in \u001b[36mPowerGridModel.__init__\u001b[39m\u001b[34m(self, input_data, system_frequency)\u001b[39m\n\u001b[32m 173\u001b[39m prepared_input = prepare_input_view(_map_to_component_types(input_data))\n\u001b[32m 174\u001b[39m \u001b[38;5;28mself\u001b[39m._model_ptr = get_pgc().create_model(system_frequency, input_data=prepared_input.get_dataset_ptr())\n\u001b[32m--> \u001b[39m\u001b[32m175\u001b[39m \u001b[43massert_no_error\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 176\u001b[39m \u001b[38;5;28mself\u001b[39m._all_component_count = {k: v \u001b[38;5;28;01mfor\u001b[39;00m k, v \u001b[38;5;129;01min\u001b[39;00m prepared_input.get_info().total_elements().items() \u001b[38;5;28;01mif\u001b[39;00m v > \u001b[32m0\u001b[39m}\n", - "\u001b[36mFile \u001b[39m\u001b[32m/power-grid-model/src/power_grid_model/_core/error_handling.py:200\u001b[39m, in \u001b[36massert_no_error\u001b[39m\u001b[34m(batch_size, decode_error)\u001b[39m\n\u001b[32m 198\u001b[39m error = find_error(batch_size=batch_size, decode_error=decode_error)\n\u001b[32m 199\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m error \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m--> \u001b[39m\u001b[32m200\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m error\n", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[2]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# Without validation\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m model = PowerGridModel(error_data)\n\u001b[32m 3\u001b[39m output_data = model.calculate_state_estimation(symmetric=\u001b[38;5;28;01mTrue\u001b[39;00m)\n", + "\u001b[36mFile \u001b[39m\u001b[32m~/power-grid-model/src/power_grid_model/_core/power_grid_model.py:175\u001b[39m, in \u001b[36mPowerGridModel.__init__\u001b[39m\u001b[34m(self, input_data, system_frequency)\u001b[39m\n\u001b[32m 173\u001b[39m prepared_input = prepare_input_view(_map_to_component_types(input_data))\n\u001b[32m 174\u001b[39m \u001b[38;5;28mself\u001b[39m._model_ptr = get_pgc().create_model(system_frequency, input_data=prepared_input.get_dataset_ptr())\n\u001b[32m--> \u001b[39m\u001b[32m175\u001b[39m \u001b[30;43massert_no_error\u001b[39;49m\u001b[30;43m(\u001b[39;49m\u001b[30;43m)\u001b[39;49m\n\u001b[32m 176\u001b[39m \u001b[38;5;28mself\u001b[39m._all_component_count = {k: v \u001b[38;5;28;01mfor\u001b[39;00m k, v \u001b[38;5;129;01min\u001b[39;00m prepared_input.get_info().total_elements().items() \u001b[38;5;28;01mif\u001b[39;00m v > \u001b[32m0\u001b[39m}\n", + "\u001b[36mFile \u001b[39m\u001b[32m~/power-grid-model/src/power_grid_model/_core/error_handling.py:196\u001b[39m, in \u001b[36massert_no_error\u001b[39m\u001b[34m(batch_size, decode_error)\u001b[39m\n\u001b[32m 194\u001b[39m error = find_error(batch_size=batch_size, decode_error=decode_error)\n\u001b[32m 195\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m error \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m--> \u001b[39m\u001b[32m196\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m error\n", "\u001b[31mIDWrongType\u001b[39m: Wrong type for object with id 4\n\nTry validate_input_data() or validate_batch_data() to validate your data.\n" ] } @@ -147,8 +147,8 @@ "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mValidationException\u001b[39m Traceback (most recent call last)", - "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[3]\u001b[39m\u001b[32m, line 4\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mpower_grid_model\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mvalidation\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m assert_valid_input_data\n\u001b[32m 3\u001b[39m \u001b[38;5;66;03m# Assert valid data\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m4\u001b[39m \u001b[43massert_valid_input_data\u001b[49m\u001b[43m(\u001b[49m\u001b[43merror_data\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msymmetric\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[32m 5\u001b[39m model = PowerGridModel(error_data)\n\u001b[32m 6\u001b[39m output_data = model.calculate_state_estimation(symmetric=\u001b[38;5;28;01mTrue\u001b[39;00m)\n", - "\u001b[36mFile \u001b[39m\u001b[32m/power-grid-model/src/power_grid_model/validation/assertions.py:56\u001b[39m, in \u001b[36massert_valid_input_data\u001b[39m\u001b[34m(input_data, calculation_type, symmetric)\u001b[39m\n\u001b[32m 52\u001b[39m validation_errors = validate_input_data(\n\u001b[32m 53\u001b[39m input_data=input_data, calculation_type=calculation_type, symmetric=symmetric\n\u001b[32m 54\u001b[39m )\n\u001b[32m 55\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m validation_errors:\n\u001b[32m---> \u001b[39m\u001b[32m56\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m ValidationException(validation_errors, \u001b[33m\"\u001b[39m\u001b[33minput_data\u001b[39m\u001b[33m\"\u001b[39m)\n", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[3]\u001b[39m\u001b[32m, line 4\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m power_grid_model.validation \u001b[38;5;28;01mimport\u001b[39;00m assert_valid_input_data\n\u001b[32m 2\u001b[39m \n\u001b[32m 3\u001b[39m \u001b[38;5;66;03m# Assert valid data\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m4\u001b[39m assert_valid_input_data(error_data, symmetric=\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[32m 5\u001b[39m model = PowerGridModel(error_data)\n\u001b[32m 6\u001b[39m output_data = model.calculate_state_estimation(symmetric=\u001b[38;5;28;01mTrue\u001b[39;00m)\n", + "\u001b[36mFile \u001b[39m\u001b[32m~/power-grid-model/src/power_grid_model/validation/assertions.py:56\u001b[39m, in \u001b[36massert_valid_input_data\u001b[39m\u001b[34m(input_data, calculation_type, symmetric)\u001b[39m\n\u001b[32m 52\u001b[39m validation_errors = validate_input_data(\n\u001b[32m 53\u001b[39m input_data=input_data, calculation_type=calculation_type, symmetric=symmetric\n\u001b[32m 54\u001b[39m )\n\u001b[32m 55\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m validation_errors:\n\u001b[32m---> \u001b[39m\u001b[32m56\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m ValidationException(validation_errors, \u001b[33m\"\u001b[39m\u001b[33minput_data\u001b[39m\u001b[33m\"\u001b[39m)\n", "\u001b[31mValidationException\u001b[39m: There are 5 validation errors in input_data:\n 1. Fields line.id and sym_power_sensor.id are not unique for 2 lines/sym_power_sensors.\n 2. Field 'to_node' does not contain a valid node id for 1 line.\n 3. Field 'power_sigma' is not greater than zero for 2 sym_power_sensors.\n 4. Field 'measured_object' does not contain a valid line/asym_line/generic_branch/transformer id for 1 sym_power_sensor. (measured_terminal_type=branch_from)\n 5. Field 'measured_object' does not contain a valid source id for 1 sym_power_sensor. (measured_terminal_type=source)" ] } @@ -287,19 +287,50 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 12, "id": "1b8ba993", "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "\"There is a validation error in the data, batch #0:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #1:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #2:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #3:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #4:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #5:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #6:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #7:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #8:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #9:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #10:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #11:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #12:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #13:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #14:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #15:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #16:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #17:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #18:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #19:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #20:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #21:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #22:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #23:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #24:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #25:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #26:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #27:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #28:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #29:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #30:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #31:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #32:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #33:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #34:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #35:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #36:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #37:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #38:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #39:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #40:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #41:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #42:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #43:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #44:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #45:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #46:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #47:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #48:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #49:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #50:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #51:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #52:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #53:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #54:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #55:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #56:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #57:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #58:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #59:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #60:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #61:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #62:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #63:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #64:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #65:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #66:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #67:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #68:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #69:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #70:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #71:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #72:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #73:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #74:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #75:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #76:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #77:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #78:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #79:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #80:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #81:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #82:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #83:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #84:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #85:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #86:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #87:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #88:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #89:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #90:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #91:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #92:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #93:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #94:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #95:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #96:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #97:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #98:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #99:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\"" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "There is a validation error in the data, batch #0:\n", + "\n", + "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", + "\t\tcomponent: sym_load\n", + "\t\tfield: 'status'\n", + "\t\tids: [3]\n", + "\n", + "There is a validation error in the data, batch #1:\n", + "\n", + "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", + "\t\tcomponent: sym_load\n", + "\t\tfield: 'status'\n", + "\t\tids: [3]\n", + "\n", + "There is a validation error in the data, batch #2:\n", + "\n", + "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", + "\t\tcomponent: sym_load\n", + "\t\tfield: 'status'\n", + "\t\tids: [3]\n", + "\n", + "There is a validation error in the data, batch #3:\n", + "\n", + "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", + "\t\tcomponent: sym_load\n", + "\t\tfield: 'status'\n", + "\t\tids: [3]\n", + "\n", + "There is a validation error in the data, batch #4:\n", + "\n", + "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", + "\t\tcomponent: sym_load\n", + "\t\tfield: 'status'\n", + "\t\tids: [3]\n", + "\n" + ] } ], "source": [ @@ -319,13 +350,13 @@ "}\n", "\n", "# update data\n", - "load_update = initialize_array(DatasetType.update, ComponentType.sym_load, (100, 1))\n", + "load_update = initialize_array(DatasetType.update, ComponentType.sym_load, (5, 1))\n", "load_update[AttributeType.id] = 3\n", "load_update[AttributeType.status] = -5\n", "batch_data = {ComponentType.sym_load: load_update}\n", "\n", "errors = validate_batch_data(input_data=input_data, update_data=batch_data, symmetric=True)\n", - "errors_to_string(errors, details=True)" + "print(errors_to_string(errors, details=True))" ] }, { @@ -342,25 +373,48 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 14, "id": "7ac337fe", "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "\"There is a validation error in the data, batch #0:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #1:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #2:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #3:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #4:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #5:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #6:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #7:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #8:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #9:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #10:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #11:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #12:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #13:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #14:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #15:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #16:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #17:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #18:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #19:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #20:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #21:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #22:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #23:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #24:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #25:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #26:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #27:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #28:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #29:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #30:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #31:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #32:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #33:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #34:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #35:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #36:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #37:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #38:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #39:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #40:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #41:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #42:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #43:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #44:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #45:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #46:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #47:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #48:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #49:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #50:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #51:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #52:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #53:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #54:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #55:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #56:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #57:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #58:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #59:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #60:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #61:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #62:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #63:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #64:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #65:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #66:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #67:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #68:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #69:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #70:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #71:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #72:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #73:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #74:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #75:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #76:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #77:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #78:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #79:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #80:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #81:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #82:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #83:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #84:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #85:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #86:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #87:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #88:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #89:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #90:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #91:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #92:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #93:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #94:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #95:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #96:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #97:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #98:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\\nThere is a validation error in the data, batch #99:\\n\\n\\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\\n\\t\\tcomponent: sym_load\\n\\t\\tfield: 'status'\\n\\t\\tids: [3]\\n\"" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "There is a validation error in the data, batch #0:\n", + "\n", + "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", + "\t\tcomponent: sym_load\n", + "\t\tfield: 'status'\n", + "\t\tids: [3]\n", + "\n", + "There is a validation error in the data, batch #1:\n", + "\n", + "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", + "\t\tcomponent: sym_load\n", + "\t\tfield: 'status'\n", + "\t\tids: [3]\n", + "\n", + "There is a validation error in the data, batch #2:\n", + "\n", + "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", + "\t\tcomponent: sym_load\n", + "\t\tfield: 'status'\n", + "\t\tids: [3]\n", + "\n" + ] } ], "source": [ - "sliced_batch_data = {component: array[:100] for component, array in batch_data.items()}\n", + "# very large update data\n", + "large_load_update = initialize_array(DatasetType.update, ComponentType.sym_load, (100, 1))\n", + "large_load_update[AttributeType.id] = 3\n", + "large_load_update[AttributeType.status] = -5\n", + "large_batch_data = {ComponentType.sym_load: large_load_update}\n", + "\n", + "sliced_batch_data = {component: array[:3] for component, array in large_batch_data.items()}\n", "errors = validate_batch_data(input_data=input_data, update_data=sliced_batch_data, symmetric=True)\n", - "errors_to_string(errors, details=True)" + "print(errors_to_string(errors, details=True))" ] }, { @@ -377,7 +431,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "04778c11", "metadata": {}, "outputs": [ @@ -391,200 +445,6 @@ "There is a validation error in the data, batch #1:\n", "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", "There is a validation error in the data, batch #2:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #3:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #4:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #5:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #6:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #7:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #8:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #9:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #10:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #11:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #12:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #13:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #14:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #15:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #16:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #17:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #18:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #19:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #20:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #21:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #22:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #23:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #24:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #25:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #26:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #27:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #28:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #29:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #30:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #31:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #32:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #33:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #34:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #35:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #36:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #37:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #38:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #39:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #40:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #41:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #42:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #43:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #44:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #45:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #46:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #47:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #48:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #49:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #50:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #51:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #52:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #53:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #54:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #55:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #56:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #57:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #58:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #59:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #60:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #61:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #62:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #63:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #64:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #65:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #66:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #67:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #68:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #69:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #70:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #71:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #72:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #73:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #74:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #75:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #76:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #77:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #78:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #79:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #80:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #81:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #82:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #83:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #84:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #85:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #86:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #87:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #88:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #89:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #90:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #91:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #92:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #93:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #94:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #95:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #96:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #97:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #98:\n", - "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n", - "There is a validation error in the data, batch #99:\n", "\tField 'status' is not a boolean (0 or 1) for 1 sym_load.\n" ] } @@ -597,8 +457,11 @@ "batch_data_1 = {ComponentType.source: source_update}\n", "batch_data_2 = {ComponentType.sym_load: load_update}\n", "\n", - "errors_1 = validate_batch_data(input_data=input_data, update_data=batch_data_1, symmetric=True)\n", - "errors_2 = validate_batch_data(input_data=input_data, update_data=batch_data_2, symmetric=True)\n", + "sliced_batch_data_1 = {component: array[:3] for component, array in batch_data_1.items()}\n", + "sliced_batch_data_2 = {component: array[:3] for component, array in batch_data_2.items()}\n", + "\n", + "errors_1 = validate_batch_data(input_data=input_data, update_data=sliced_batch_data_1, symmetric=True)\n", + "errors_2 = validate_batch_data(input_data=input_data, update_data=sliced_batch_data_2, symmetric=True)\n", "\n", "print(errors_to_string(errors_1, details=False) + errors_to_string(errors_2, details=False))" ] @@ -606,7 +469,7 @@ ], "metadata": { "kernelspec": { - "display_name": "power-grid-model", + "display_name": "power-grid-model (3.14.x)", "language": "python", "name": "python3" }, @@ -620,7 +483,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.14.3" + "version": "3.14.6" } }, "nbformat": 4,