bazelbuild / bazelbuild/rules_apple
Extend `apple_core_ml_library` functionality
- Dominant language
- Starlark
- Stars
- 593
- Forks
- 334
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 9
Description
[apple_core_ml_library](https://github.com/bazelbuild/rules_apple/blob/master/doc/rules-resources.md#apple_core_ml_library) and its companion, [swift_apple_core_ml_library](https://github.com/bazelbuild/rules_apple/blob/master/doc/rules-resources.md#swift_apple_core_ml_library) are convenient wrappers for getting a model deployed. However, they are mostly a wrapper around `coremlcompiler generate`. There doesn't appear to be a wrapper around `coremlcompiler compile` that produces a `.mlmodelc`. [compile_mlmodel](https://github.com/bazelbuild/rules_apple/blob/dba22b711123b1d3f9d15dc31f839e2eb8aada5d/apple/internal/resource_actions/mlmodel.bzl#L26) is surfaced through `resources_support` but it doesn't seem to be used.
A Bazel-based wrapper around `coremlcompiler compile` that automatically passes arguments like `--platform` and `--deployment-target xx.yy.zz` would be extremely helpful.
Contributor guide
Research direction
Start with doc/rules-resources.md and apple/internal/resource_actions/mlmodel.bzl, especially compile_mlmodel and how resources_support exposes it. Review the existing apple_core_ml_library and swift_apple_core_ml_library entry points, then trace coremlcompiler compile usage. Done means a Bazel wrapper produces .mlmodelc and passes platform and deployment-target arguments automatically.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100