Product documentation — installation, licensing, and integration guides.
SolvScout / SolvTune
Examples
05 Product profile token

Journey 05 — Product profile token

Mint an opaque rx-... profile token for solvsrk.run_profile() — the production hand-off from SolvTune analysis to SolvSRK execution.

Prerequisites: Journey 04 — you understand compare() vs live integration. Scenario: recommend_product() for portable SolvSRK configs

Key APIs

  • solvscout.recommend_product(profile, objective=...)
  • ProductRecommendation.profile
  • ProductRecommendation.to_public_dict()
  • solvsrk.run_profile(token, ...)

Concepts to internalize

  • Opaque token — encodes tuned knobs; runtime decodes verbatim. You ship a string, not a struct.
  • Objective changes the token — precision-first vs survival-first picks differ.
  • recommend() vs recommend_product() — lab ranking vs single portable deployment artifact.
  • SolvScout stops here — integration is always SolvSRK (or another arm you chose manually).

Important code

The guided tour script wraps this pattern. Copy the production shape into your pipeline:

import solvscout as scout
import solvsrk
 
profile = scout.classify(rhs, y0, t_span).profile
prod = scout.recommend_product(profile, objective='balanced')
 
print(prod.solver, prod.confidence)
print(prod.to_public_dict())  # copy-paste for deployment
 
token = prod.profile
result = solvsrk.run_profile(
    token, ndim=3, t0=0.0, t_end=100.0, y0=y0,
    rhs_fn=rhs, jac_fn=jac_fn,
)

Act-by-act walkthrough

Act 1 — recommend_product() - the portable path

compare() and recommend() show ranked arms; compare() also prints a copy-paste solvsrk.config(...) line per objective. recommend_product() returns a single opaque profile token (rx-...) for solvsrk.run_profile — same tuned knobs, different packaging. The runtime decodes the token verbatim; it never re-runs SolvTune.

FieldValueNotes
solversolvsrk
objectivebalanced
confidencehighPublic dict to copy: {'solver': 'solvsrk', 'profile': 'rx-UlgBAQAAAgkAcm9iZXJ0c29uBxe30TjMvIwrzLyMKwAAoEAAAHBCAACAPwAAAABSRaqY'}
  • The 'profile' string is opaque on purpose - it encodes tuned knobs the runtime decodes.

Act 2 — Objective changes the token

A precision-first pick can encode different tuned knobs than a survival-first one, so the token differs.

recommend_product() per objective (3 steps)

FieldValueNotes
solversolvsrk
profile_tokenrx-UlgBAQAAAgkAc...
confidencehigh
solversolvsrk
profile_tokenrx-UlgBAQABAgkAc...
confidencehigh
solversolvsrk
profile_tokenrx-UlgBAQACAgkAc...
confidencehigh

Act 3 — Hand off to execution

Paste the token into a licensed SolvSRK runtime (solvsrk.run_profile). SolvScout's job ends here - integration happens in the execution layer.

  • Pattern: token = recommend_product(profile).profile -> solvsrk.run_profile(...)

Guided tour output

Verified console capture from 05_product_profile.py:

recommend_product() for portable SolvSRK configs

-- Act 1 - recommend_product() - the portable path --
  -> compare() and recommend() show ranked arms; compare() also prints a copy-paste solvsrk.config(...) line per objective. recommend_product() returns a single opaque profile token (rx-...) for solvsrk.run_profile — same tuned knobs, different packaging. The runtime decodes the token verbatim; it never re-runs SolvTune.
  solver: solvsrk
  objective: balanced
  confidence: high
  -> Public dict to copy: {'solver': 'solvsrk', 'profile': 'rx-UlgBAQAAAgkAcm9iZXJ0c29uBxe30TjMvIwrzLyMKwAAoEAAAHBCAACAPwAAAABSRaqY'}
  log: The 'profile' string is opaque on purpose - it encodes tuned knobs the runtime decodes.

-- Act 2 - Objective changes the token --
  -> A precision-first pick can encode different tuned knobs than a survival-first one, so the token differs.
  _section: recommend_product() per objective (3 steps)
  solver: solvsrk
  profile_token: rx-UlgBAQAAAgkAc...
  confidence: high
  solver: solvsrk
  profile_token: rx-UlgBAQABAgkAc...
  confidence: high
  solver: solvsrk
  profile_token: rx-UlgBAQACAgkAc...
  confidence: high

-- Act 3 - Hand off to execution --
  -> Paste the token into a licensed SolvSRK runtime (solvsrk.run_profile). SolvScout's job ends here - integration happens in the execution layer.
  log: Pattern: token = recommend_product(profile).profile -> solvsrk.run_profile(...)

-- Run complete --
  next_journey: 06_limits.py
  product_solver: solvsrk

Run it

cd python
# Guided tour — narrated scenario walkthrough (recommended first run):
python examples/journeys/05_product_profile.py
 
# Production one-liner — same API call you ship:
python -c "import solvscout as s; rhs=lambda t,y:(lambda y1,y2,y3:[-0.04*y1+1e4*y2*y3,0.04*y1-1e4*y2*y3-3e7*y2*y2,3e7*y2*y2])(*y); c=s.classify(rhs,[1,0,0],(0,100)); print(s.recommend_product(c.profile).solver)"

What comes next

Journey 06 states honest limits: no integration, corpus-conditioned confidence, IVP-only scope.

Navigation

← Journey 04 — Compare arms · Journey 06 — Limits and non-goals →