@@ -81,13 +81,15 @@ class Family(NamedTuple):
8181 """A live family's target clusters, node demands and whether its smoke matrix is complete.
8282
8383 ``node_demand`` is the node count of its largest AgentX job, ``sweep_node_demand`` the
84- nodes of every job of its full AgentX sweep.
84+ nodes of every job of its full AgentX sweep. ``images`` pairs each key with its master image
85+ when the keys use different images, and is empty otherwise.
8586 """
8687
8788 clusters : frozenset [str ]
8889 node_demand : int
8990 sweep_node_demand : int
9091 smoke_covers_full : bool
92+ images : tuple [tuple [str , str ], ...] = ()
9193
9294
9395class History (NamedTuple ):
@@ -160,9 +162,9 @@ def live_families(root: Path) -> dict[tuple, dict[str, Family]]:
160162
161163 Archives and fixed-seq-len points are excluded. A family is one AgentX dashboard curve: every
162164 master key of one master file whose points share model, hardware, framework and precision,
163- since the newest run replaces that whole curve. Curves spanning master files or using several
164- images are left out. A family's smoke matrix covers its full sweep when the generator's
165- ``--smoke`` selection keeps every benchmark point and default eval.
165+ since the newest run replaces that whole curve. Curves spanning master files are left out.
166+ A family's smoke matrix covers its full sweep when the generator's ``--smoke`` selection
167+ keeps every benchmark point and default eval.
166168 """
167169 from infx .clusters import load_inventory
168170 from infx .config import project_root
@@ -219,9 +221,7 @@ def live_families(root: Path) -> dict[tuple, dict[str, Family]]:
219221 if not clusters :
220222 print (f"::warning::Klaud live-family-clusters-unresolved: { family } " )
221223 continue
222- if len ({normalized_image (entry ["image" ]) for entry in entries }) > 1 :
223- print (f"::notice::Klaud skips { family } : its keys use different images." )
224- continue
224+ images = {key : normalized_image (rows [0 ]["image" ]) for (_ , key ), rows in members .items ()}
225225 evals = [
226226 dict (row , ** {"eval-only" : True })
227227 for row in mark_eval_entries (deepcopy (entries ), root )
@@ -235,6 +235,7 @@ def live_families(root: Path) -> dict[tuple, dict[str, Family]]:
235235 sweep_node_demand = sum (entry .get ("node-count" , 1 ) for entry in [* entries , * evals ]),
236236 smoke_covers_full = point_identities (smoke ) == point_identities (entries )
237237 and expected_evals ({"evals" : smoke_evals }) == expected_evals ({"evals" : evals }),
238+ images = tuple (sorted (images .items ())) if len (set (images .values ())) > 1 else (),
238239 )
239240 for entry in entries :
240241 row = {
@@ -264,18 +265,24 @@ def choose(
264265 A branch or claim of the family, or of a single-key family of one of its keys, occupies it.
265266 The order is a weighted shuffle: a family's weight is its benchmark age in days plus one, so
266267 older images tend to lead without starving recent ones. Headroom is checked but not consumed
267- here, so the overlap review keeps alternatives.
268+ here, so the overlap review keeps alternatives. A family whose keys use different images
269+ maps each key to the curve's newest observation of that key's image as ``sources``, and
270+ each key whose image has none to that image as ``unbaselined-keys``.
268271 """
269272 occupied = {re .sub (r"^klaud[e]?/auto-" , "klaud/auto-" , branch ) for branch in occupied }
270273 selected = []
271274 keys : list [float ] = []
272275 seen = set ()
273- valid = [item for item in items if item ["source-status" ] == "baseline" ]
274- for item in sorted (
275- valid ,
276+ valid = sorted (
277+ (item for item in items if item ["source-status" ] == "baseline" ),
276278 key = lambda item : (item ["source" ]["date" ], item ["source-id" ]),
277279 reverse = True ,
278- ):
280+ )
281+ newest : dict [tuple [str , str ], dict ] = {}
282+ for item in valid :
283+ for family in families .get (observation_key (item ["source" ]), {}):
284+ newest .setdefault ((family , observation_key (item ["source" ])[- 1 ]), item ["source" ])
285+ for item in valid :
279286 row = item ["source" ]
280287 legacy = identity (
281288 {
@@ -298,12 +305,22 @@ def choose(
298305 name = identity (member )[:16 ]
299306 claims |= {f"klaud/auto-{ name } -" , f"klaud/auto-{ name } -{ image_key } " }
300307 claims .add (f"klaud/claim-{ name } " )
308+ sources = {
309+ key : row if image == observation_key (row )[- 1 ] else newest .get ((family , image ))
310+ for key , image in record .images
311+ }
301312 if (
302313 family in seen
303314 or claims & occupied
304315 or any (headroom .get (cluster , 0 ) < record .node_demand for cluster in record .clusters )
305316 ):
306317 continue
318+ mixed = {
319+ "sources" : {key : source for key , source in sources .items () if source },
320+ "unbaselined-keys" : {
321+ key : image for key , image in record .images if not sources [key ]
322+ },
323+ }
307324 selected .append (
308325 {
309326 "id" : branch .removeprefix ("klaud/auto-" ),
@@ -314,6 +331,7 @@ def choose(
314331 "smoke-covers-full" : record .smoke_covers_full ,
315332 "source" : row ,
316333 "branch" : branch ,
334+ ** (mixed if sources else {}),
317335 }
318336 )
319337 keys .append (random .expovariate (item ["benchmark-age-days" ] + 1 ))
@@ -1246,7 +1264,13 @@ def select(
12461264 ``directory``.
12471265 """
12481266 from . import claims , validation
1249- from .reporting import BaselinePreflight , Prose , missing_baseline_points , resolve_baseline
1267+ from .reporting import (
1268+ BaselinePreflight ,
1269+ Prose ,
1270+ missing_baseline_points ,
1271+ resolve_baseline ,
1272+ unpublished_keys ,
1273+ )
12501274
12511275 contexts = json .loads ((directory / "candidates.json" ).read_text ())
12521276 producers = json .loads ((directory / PRODUCERS ).read_text ())
@@ -1318,6 +1342,7 @@ def select(
13181342 baseline = baseline ,
13191343 )
13201344 missing = missing_baseline_points (matrix , baseline )
1345+ unpublished = unpublished_keys (matrix , baseline )
13211346 except (VerificationError , ReadError ) as error :
13221347 baseline_deferred .append (candidate ["id" ])
13231348 baseline_reasons [candidate ["id" ]] = str (error )
@@ -1333,14 +1358,15 @@ def select(
13331358 baseline_reasons [candidate ["id" ]] = f"{ type (error ).__name__ } : { str (error )[:300 ]} "
13341359 families .add (decision .family )
13351360 continue
1336- if missing :
1361+ if missing or unpublished :
13371362 baseline_deferred .append (candidate ["id" ])
13381363 baseline_reasons [candidate ["id" ]] = "baseline-point-mismatch"
13391364 baseline_mismatches .append (
13401365 {
13411366 "id" : candidate ["id" ],
13421367 "reason" : "baseline-point-mismatch" ,
13431368 "missing-points" : len (missing ),
1369+ ** ({"unpublished-keys" : unpublished } if unpublished else {}),
13441370 }
13451371 )
13461372 families .add (decision .family )
0 commit comments