docs: usage guides backed by a real compiling samples module (#101, #102, #105)#729
Merged
Merged
Conversation
#102, #105) Fill the documentation gap for tensor usage/ops (#101), benchmark/perf/metrics usage (#102), and layout/simple-usage/samples (#105) with real, CI-verified code instead of hand-typed snippets. New `skainet-docs-samples` gradle module whose Kotlin sources ARE the Antora example resources (commonMain srcDir -> docs/modules/ROOT/examples/kotlin), so every snippet is compiled and executed by `:skainet-docs-samples:jvmTest`. Antora pages pull tagged regions via `include::example$kotlin/...[tag=...]`. Demos (all using the public DSLs): - TensorBasics.kt — data-DSL construction, init strategies, eager ops, broadcasting - Quickstart.kt — sequential { } model + forward - TrainingDemo.kt — training { } loop + accuracy metric Pages: - rewrite explanation/examples/index.adoc (replace 6 TODO stubs with live includes) - new tutorials/kotlin-getting-started.adoc - new how-to/tensor-ops.adoc - new how-to/metrics-and-perf-testing.adoc (links existing benchmark guides) - nav.adoc xrefs Closes #101 Closes #102 Closes #105 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fills the documentation gap for #101 (tensor usage & ops), #102 (benchmark/perf/metrics usage), and #105 (layout, simple usage, samples) — using real, CI-verified compiling code rather than hand-typed snippets that rot.
Keeps the SKaiNET spirit: the examples are the DSLs in action.
How
New gradle module
skainet-docs-sampleswhose Kotlin sources are the Antora example resources — itscommonMainsrcDir points atdocs/modules/ROOT/examples/kotlin. One source of truth: the same files compile, run as tests (:skainet-docs-samples:jvmTest), and are included into the docs viainclude::example$kotlin/...[tag=...]. This matches the existing tagged-include pattern (include::partial$ops/...[tag=...]).Demos (public DSLs, copied from proven code in
skainet-lang-models)TensorBasics.kt— data-DSL construction, init strategies, eager ops (matmul/t()/reshape/relu), broadcastingQuickstart.kt—sequential { input; dense; activation }→forwardTrainingDemo.kt—training { model/loss/optimizer }loop + accuracy metricSamplesTest.ktruns all three (loss decreases; broadcasting1+10+100=111; forward[1,10])Pages
explanation/examples/index.adoc— replaced 6 commented-out TODO includes with live tagged includestutorials/kotlin-getting-started.adoc([D] Document implmnete layout, simple usage, samples #105)how-to/tensor-ops.adoc([D] Document tensors usage and supported ops #101)how-to/metrics-and-perf-testing.adoc— documents the accuracy metric and links the existing benchmark guides ([D] document the usage #102)nav.adocxrefs addedVerification
./gradlew :skainet-docs-samples:jvmTest→ BUILD SUCCESSFUL (3 tests)tag=references resolve to real regions; no dangling xrefs in the new pagesCloses #101
Closes #102
Closes #105
🤖 Generated with Claude Code