Test various methods and properties of the YOLO model to ensure correct functionality.
()
| 74 | |
| 75 | |
| 76 | def test_model_methods(): |
| 77 | """Test various methods and properties of the YOLO model to ensure correct functionality.""" |
| 78 | model = YOLO(MODEL) |
| 79 | |
| 80 | # Model methods |
| 81 | model.info(verbose=True, detailed=True) |
| 82 | model = model.reset_weights() |
| 83 | model = model.load(MODEL) |
| 84 | model.to("cpu") |
| 85 | model.fuse() |
| 86 | model.clear_callback("on_train_start") |
| 87 | model.reset_callbacks() |
| 88 | |
| 89 | # Model properties |
| 90 | _ = model.names |
| 91 | _ = model.device |
| 92 | _ = model.transforms |
| 93 | _ = model.task_map |
| 94 | |
| 95 | |
| 96 | def test_model_profile(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…