Skip to content

docs: usage guides backed by a real compiling samples module (#101, #102, #105)#729

Merged
michalharakal merged 1 commit into
developfrom
docs/usage-guides-101-102-105
Jun 10, 2026
Merged

docs: usage guides backed by a real compiling samples module (#101, #102, #105)#729
michalharakal merged 1 commit into
developfrom
docs/usage-guides-101-102-105

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

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-samples whose Kotlin sources are the Antora example resources — its commonMain srcDir points at docs/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 via include::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), broadcasting
  • Quickstart.ktsequential { input; dense; activation }forward
  • TrainingDemo.kttraining { model/loss/optimizer } loop + accuracy metric
  • SamplesTest.kt runs all three (loss decreases; broadcasting 1+10+100=111; forward [1,10])

Pages

Verification

  • ./gradlew :skainet-docs-samples:jvmTestBUILD SUCCESSFUL (3 tests)
  • All 9 tag= references resolve to real regions; no dangling xrefs in the new pages
  • Full Antora render runs in CI

Closes #101
Closes #102
Closes #105

🤖 Generated with Claude Code

#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>
@github-actions

Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-729 artifact to view the complete documentation locally.

This comment will be updated automatically when the PR is updated.

@michalharakal michalharakal merged commit ab8955b into develop Jun 10, 2026
8 checks passed
@michalharakal michalharakal deleted the docs/usage-guides-101-102-105 branch June 10, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[D] Document implmnete layout, simple usage, samples [D] document the usage [D] Document tensors usage and supported ops

1 participant