mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 08:56:35 +00:00
Update autopilot workflow and documentation for project cycle completion
- Modified the existing-code workflow to automatically loop back to New Task after project completion without user confirmation. - Updated the autopilot state to reflect the current step as `done` and status as `completed`. - Clarified the deployment status report by specifying non-deployed services and their purposes. These changes enhance the automation of task management and improve documentation clarity.
This commit is contained in:
@@ -11,6 +11,7 @@ _TEST_ROOT = _TESTS_DIR / "root"
|
||||
_DATASET_IMAGES = _TEST_ROOT / "data" / "images"
|
||||
_DATASET_LABELS = _TEST_ROOT / "data" / "labels"
|
||||
_ONNX_MODEL = _PROJECT_ROOT / "_docs/00_problem/input_data/azaion.onnx"
|
||||
_PT_MODEL = _PROJECT_ROOT / "_docs/00_problem/input_data/azaion-2025-03-10.pt"
|
||||
_CLASSES_JSON = _PROJECT_ROOT / "src" / "classes.json"
|
||||
_CONFIG_TEST = _PROJECT_ROOT / "config.test.yaml"
|
||||
_MODELS_DIR = _TEST_ROOT / "models"
|
||||
@@ -88,6 +89,14 @@ def fixture_onnx_model():
|
||||
return p.read_bytes()
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def fixture_pt_model():
|
||||
p = _PT_MODEL
|
||||
if not p.is_file():
|
||||
pytest.skip(f"missing pt model: {p}")
|
||||
return str(p)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def fixture_classes_json():
|
||||
p = _CLASSES_JSON
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
@@ -180,3 +181,27 @@ class TestCoremlExport:
|
||||
# Assert
|
||||
assert len(results) == 1
|
||||
assert results[0].boxes is not None
|
||||
|
||||
|
||||
_INPUT_DATA = _TESTS_DIR.parent / "_docs" / "00_problem" / "input_data"
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform != "darwin", reason="CoreML requires macOS")
|
||||
class TestCoremlExportRealModel:
|
||||
def test_export_azaion_pt_to_coreml(self, fixture_pt_model):
|
||||
# Arrange
|
||||
output_dir = _INPUT_DATA / "azaion.mlpackage"
|
||||
if output_dir.exists():
|
||||
shutil.rmtree(output_dir)
|
||||
|
||||
# Act
|
||||
model = YOLO(fixture_pt_model)
|
||||
model.export(format="coreml", imgsz=1280)
|
||||
exported = Path(fixture_pt_model).with_suffix(".mlpackage")
|
||||
if exported != output_dir:
|
||||
shutil.move(str(exported), str(output_dir))
|
||||
|
||||
# Assert
|
||||
assert output_dir.exists()
|
||||
model_file = output_dir / "Data" / "com.apple.CoreML" / "model.mlmodel"
|
||||
assert model_file.exists()
|
||||
|
||||
Reference in New Issue
Block a user