Skip to content

Add Python SDK & model runner test framework (186 tests)#1

Merged
Jovonni merged 4 commits intomainfrom
fix/model-registration-1
Mar 1, 2026
Merged

Add Python SDK & model runner test framework (186 tests)#1
Jovonni merged 4 commits intomainfrom
fix/model-registration-1

Conversation

@Jovonni
Copy link
Contributor

@Jovonni Jovonni commented Mar 1, 2026

  • 29 test files across 4 categories: SDK unit (119), framework integration (22), model runner (37), E2E integration (8)
  • Shared conftest.py with HTTP mocking, env fixtures, sample models, singleton reset
  • CI workflow with 4 parallel jobs: SDK unit (Python 3.9/3.11/3.12 matrix), framework, model runner, integration
  • Makefile targets: test-sdk, test-sdk-unit, test-sdk-frameworks, test-sdk-cov
  • pyproject.toml test extras

- 29 test files across 4 categories: SDK unit (119), framework integration (22), model runner (37), E2E integration (8)
- Shared conftest.py with HTTP mocking, env fixtures, sample models, singleton reset
- CI workflow with 4 parallel jobs: SDK unit (Python 3.9/3.11/3.12 matrix), framework, model runner, integration
- Makefile targets: test-sdk, test-sdk-unit, test-sdk-frameworks, test-sdk-cov
- pyproject.toml test extras
@Jovonni Jovonni self-assigned this Mar 1, 2026
@Jovonni Jovonni added the enhancement New feature or request label Mar 1, 2026
Jovonni added 3 commits March 1, 2026 14:23
- Fix: guard pandas/numpy imports with pytest.importorskip in
  test_datasets.py and test_features.py (caused CI collection errors)
- Fix: add numpy/pandas to SDK unit test CI install step
- Fix: add fix/** branch trigger to test-python.yml
- Add TF/Keras detection tests to test_detect_framework.py
- Add TF serialization roundtrip test to test_serialize_model.py
- Add TF/Keras model registration test to test_models.py
- Add register_model roundtrip integration tests: sklearn, pytorch,
  tensorflow — verifies full pipeline (detect → serialize → codegen →
  exec train/infer) through the SDK abstraction layer
- Remove unnecessary _serialize_model mock from pytorch registration test
  (SimpleNet is now at module level, picklable by torch.save)

190 tests passing, 8 skipped.
test_create_dataset_from_dataframe_parquet requires pyarrow/fastparquet
for pd.to_parquet() and pd.read_parquet(). Skip gracefully in CI
environments that don't have it.
Tests the full roundtrip: serialize model → mock API artifact download →
load_model() deserializes → verify usable model object.

- sklearn: pickle.dumps → load_model → LogisticRegression with correct params
- PyTorch: torch.save → load_model → nn.Module with working forward pass
- TensorFlow: model.save(.keras) → load_model → working predict()
- Unknown framework: raises ValueError

This closes the last framework-aware SDK function that wasn't tested
per model type. All framework-specific code paths now have coverage.
@Jovonni Jovonni merged commit 1fef809 into main Mar 1, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant