Repository navigation
Description
Sub-issue of #1222 (Precision, Recall and F1Score metrics).
Lane: 3 · Platform verification · Android
Skill needed: Android build tooling — running a Kotlin Multiplatform module's tests on this target. No tensor-internals or metrics knowledge required. The code under test is pure commonMain Kotlin over Double counters; this is a smoke check, not new implementation.
Size: s (~1–2 h — see Notes: host tests are not enabled for this module yet, so the first step is a small build change)
Blocked by: #1229 (F1Score merged to develop), or check out its branch early.
What to do
- Check whether
skainet-backends/skainet-backend-cpurunscommonTeston the Android
target at all. As of today it does not:./gradlew :skainet-backends:skainet-backend-cpu:tasks --all
warns "The commonTest source directory exists, but android host tests are not
enabled. To enable android host tests, addwithHostTest {}to your android target
configuration" and lists no Android test task. - Add
withHostTest {}to the module's Android target configuration (the
com.android.kotlin.multiplatform.libraryplugin, applied viask.ainet.multiplatform
/libs.plugins.androidMultiplatformLibrary— check whether it belongs in the
convention plugin underbuild-logic/convention/so every module gets it, and say
which you chose in the PR). - Run the resulting host-test task (something like
./gradlew :skainet-backends:skainet-backend-cpu:testAndroidHostTest— take the name
from the task list) and, if you have a device or emulator, the instrumented variant too.
Then, in every case:
- Confirm the metric tests (
sk.ainet.exec.metrics.*) pass and the values match the JVM run
bit-for-bit — pureLongcounting andDoubledivision, so any drift is itself a finding. - Report on [Feature]: Precision, Recall and F1Score metrics #1222: target, toolchain versions, pass/fail, wall-clock, anything
target-specific you hit (anexpect/actualgap, a disabled test source set, a task
that doesn't exist).
Acceptance
- Result posted on [Feature]: Precision, Recall and F1Score metrics #1222 with the exact Gradle task(s) run
- If something is wrong, a separate bug issue opened and linked — don't block the
parent on investigating it here
Notes
Enabling host tests may surface other failing tests in commonTest that have never run
on Android before. If so, that is a real finding: report the list on the parent and open
one bug for it; do not try to fix them in this PR. The kmp / Android conventions live
in build-logic/convention/ — see Explanation → Android NEON kernels via JNI for how
the Android target is wired.
Activity