Skip to content

Add ALS i2i similarity as the first experimental workload on the Step DSL - #325

Merged
em3s merged 1 commit into
mainfrom
feat/als-i2i-experiment
May 20, 2026
Merged

em3s merged 1 commit into
mainfrom
feat/als-i2i-experiment

Conversation

@em3s

@em3s em3s commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

ALS i2i similarity experiment dogfooding the Step DSL on V2 edge JSON. First real workload that drove the Source/Flow/Merge/Split/Sink spec revision in #313.

Closes none — sits on top of the Step DSL (#314, merged). Built-ins follow the <function>Transform convention from #313; both extend Flow.

Changes

  • AlsTransform (Flow 1→1): wraps spark.ml.recommendation.ALS; emits item factors. Implicit-feedback defaults.
  • TopKSimilarityTransform (Flow 1→1): cosine similarity self-cross-join + Window top-K. Output schema (item_id long, similar_item_id long, score double, rank int).
  • pipeline/conf/als-i2i-experiment.yaml: production-shape workflow — FileSource(json) → SqlTransform(prep) → AlsTransform → TopKSimilarityTransform → FileSink(parquet).
  • Spark MLlib added to pipeline module (compileOnly + testImplementation).

How to Test

  • ./gradlew :pipeline:test — AlsTransformTest (2), TopKSimilarityTransformTest (5), AlsI2iWorkflowTest (end-to-end on synthetic two-cluster edges; verifies each item's top-1 neighbor is its cluster sibling).
  • For real data: drop V2 edge JSON dumps under the path: in the YAML and run via spark-submit --class com.kakao.actionbase.pipeline.jobs.StepsRunnerJob.

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Code (Opus 4.7, 1M context)

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels May 13, 2026
@em3s
em3s force-pushed the feat/als-i2i-experiment branch from b6784e2 to 0befd43 Compare May 13, 2026 15:11
@em3s
em3s force-pushed the feat/step-dsl-313 branch from bfd708a to fab948f Compare May 20, 2026 14:21
@em3s
em3s force-pushed the feat/als-i2i-experiment branch from 0befd43 to 4e1fa6f Compare May 20, 2026 14:36
Base automatically changed from feat/step-dsl-313 to main May 20, 2026 14:41
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels May 20, 2026
@em3s
em3s force-pushed the feat/als-i2i-experiment branch from 4e1fa6f to 277df41 Compare May 20, 2026 14:44
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels May 20, 2026
@em3s em3s changed the title feat: ALS-based i2i similarity experiment feat(pipeline): ALS i2i — first experimental workload on the Step DSL May 20, 2026
@em3s em3s changed the title feat(pipeline): ALS i2i — first experimental workload on the Step DSL Add ALS i2i similarity as the first experimental workload on the Step DSL May 20, 2026
Dogfoods the Step DSL on a real workload: V2 edge JSON →
SqlTransform (prep) → AlsTransform → TopKSimilarityTransform → FileSink.

- AlsTransform (Flow 1→1): wraps spark.ml.recommendation.ALS; emits item
  factors. Implicit-feedback defaults.
- TopKSimilarityTransform (Flow 1→1): cosine-similarity self-join + Window
  top-K, schema (item_id, similar_item_id, score, rank).
- conf/als-i2i-experiment.yaml: production-shape workflow.
- Spark MLlib added to the pipeline module (compileOnly + testImplementation).

Built-ins follow the <function>Transform convention (issue #313); both
extend Flow. Sits on top of the Step DSL (#314).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@em3s
em3s force-pushed the feat/als-i2i-experiment branch from 277df41 to 4310d76 Compare May 20, 2026 14:57
@em3s
em3s merged commit ed86649 into main May 20, 2026
2 checks passed
@em3s
em3s deleted the feat/als-i2i-experiment branch May 20, 2026 15:02
@em3s em3s self-assigned this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant