Survey IO¶
A survey file is the HDF5 output of hifuku. It holds one framework, the
coordinate system that hifuku.framework builds, and the work
done inside it. A file can hold a framework and no runs, and a run is appended
in place.
Survey holds one file. It reads and writes the file and checks every seal
when it reads. Survey.index gives one row for each run and record. A Run
is one batch of work, with the provenance of the process that made it. Each
SurveyRecord in a run is one gene surveyed on one chart: its parameters,
its elite archive, its checkpoint history and its seal. A BrokenLink
reports a record whose ancestry does not hold.
SurveyRun runs one batch of work, a Batch of SurveyTask
units, inside a framework that is already built. Cloud collects the elite
trees of named runs as CloudPoint values, and Ordination stores one
embedding of a cloud.
Survey
¶
One framework and the work done inside it.
Construct one directly, or with :meth:run. A survey may hold no runs at
all, which is a coordinate system nobody has surveyed in yet.
save and load are a plain, predictable round trip, and
:meth:append_run adds one run to a file already on disk without rewriting
what is there. None of the three holds resume or caching logic; that lives
in the caller.
Source code in src/hifuku/survey_io.py
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 | |
alignments
property
¶
The alignment pool, as :class:~hifuku.framework.AlignmentInfo.
timing
property
¶
What the runs cost together, keyed <step>/<clock>.
A file holding several runs adds their spans, because the runs happened
one after another from the file's point of view even when they happened
on different machines. Read one run's own timing to compare
machines.
cpu_seconds
property
¶
Processor seconds the runs held, user and system together.
Read against :attr:wall_seconds. A run holding a processor for as
long as it ran is limited by the host.
device_seconds
property
¶
Seconds spent inside the device engine. Zero when the engine does not measure device time: the host engine and the WebGPU engine.
metric
property
¶
The cloud-wide tree metric of this survey.
Built from the NJ tree of every alignment in the pool, so analysis over
the whole cloud uses one normalization. A chart carries its own
BranchScoreMetric, whose weight w comes from
that chart alone, so this is not the metric of any one chart.
alignment
¶
check_lineage
¶
Every illumination whose ancestry no longer holds, and why.
An illumination that continues another records the run it came from and the digest of what that run produced. The digest is what the parent found, so a parent that has since been changed no longer matches what its child recorded, and the child is continuing from an archive that is not in the file any more.
Four faults, told apart because they need different answers. A link is
"changed" when the parent is present and its seal or its end state
is not the one the child started from, or "missing" when the parent
is not in the file at all. A continuation with no seal is
"unsealed", because it names a parent and nothing binds it to one.
Everything further down is "ancestor": its own link still matches,
and it is untrustworthy because something above it is not. That
distinction is what sends a reader to where a problem started rather
than to the whole chain at once.
This compares the links only. Whether each record still matches its
own seal is :meth:verify.
Returns:
| Type | Description |
|---|---|
list of BrokenLink
|
Empty when the file's ancestry holds. An illumination that began from nothing has no ancestry to check and never appears. |
Source code in src/hifuku/survey_io.py
verify
¶
Every way this survey fails to match its own digests, as text.
Each record is checked against its seal, each run against its id, and each link against its parent. A record with no seal is listed, because nothing it claims is bound to anything.
This shows that nothing changed after it was sealed, and which state
each record started from. It does not show that an end state follows
from its inputs. See :func:hifuku.replay.replay_record for that.
Returns:
| Type | Description |
|---|---|
list of str
|
Empty when every record is sealed and every digest holds. |
Source code in src/hifuku/survey_io.py
run_by_id
¶
The run with this id.
run_by_label
¶
Return the run carrying this label.
A label is set by whoever ran the batch, so two runs can carry the same
one: two people working on two machines may pick the same word, and
merging their files brings both into view. A run id cannot collide,
because it is a digest over the framework, the work and the provenance,
so :meth:run_by_id is the way to name one of an ambiguous pair.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
A run label. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
No run carries this label. |
ValueError
|
More than one run carries it. The message lists them by group
name, which ends in the run id, so the call can be repeated with
:meth: |
Source code in src/hifuku/survey_io.py
records
¶
variations_per_second
¶
Variations the surveys made for each elapsed second of surveying.
This counts the surveying alone. Building the charts is left out, so the rate compares one engine against another rather than one whole command against another.
Source code in src/hifuku/survey_io.py
timing_report
¶
The recorded steps as a table, longest first, for a person to read.
The framework's steps are named apart from the runs', because building the charts is paid once and surveying is paid per batch. Adding the two would hide that.
Source code in src/hifuku/survey_io.py
run
classmethod
¶
Run every gene of batch in framework and return the Survey.
This is :class:SurveyRun with the loop written out. Call
SurveyRun directly to watch a run, to skip finished work, or to send
a task to another host.
Source code in src/hifuku/survey_io.py
archive
¶
EliteArchive for a surveyed gene on a chart.
run picks between two runs that both surveyed this gene. Without
it, a gene surveyed twice raises rather than returning whichever came
first: choosing between two runs is the reader's question, and the error
names both so it can be answered.
Source code in src/hifuku/survey_io.py
frame
¶
Every elite niche across every run, one row each.
Columns: run, label, gene, chart, chart_label,
i, j, lam1, lam2, logL and z. Where
:meth:index has a row per survey, this has a row per niche, so it is
the table to reach for when the question is about where the elites sit
rather than about which surveys are here.
The run is a column because two runs of one gene fill the same niches with different trees, and a table without it would stack them silently.
Call .to_pandas() on the result for callers who want that form.
Source code in src/hifuku/survey_io.py
cloud
¶
The stored cloud spanning these runs, made and kept if there is none.
Called bare it means every run in this survey as it stands. It is a fetcher first and a factory second: a cloud spanning exactly this run set is returned rather than duplicated, so a notebook cell that reruns does not fill the file with copies of one cloud.
There is no reserved label and no special case for "everything". A cloud given no label is named after the runs it spans, so a reader sees which work an embedding covers without opening anything.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_ids
|
iterable of str
|
The runs to span. Defaults to every run in this survey. |
None
|
label
|
str
|
A name for a cloud that has to be created. Ignored when one is already stored for this run set, since a stored cloud keeps the name it was given. |
None
|
Source code in src/hifuku/survey_io.py
points
¶
The elite trees of a cloud, in the cloud's order.
Returns a list of :class:CloudPoint. An embedding's rows line up with
this list and with nothing else. Without a cloud, the whole survey is
meant, which materializes the default cloud.
The order comes from the cloud's own stored identity rather than from walking the runs again. A cloud is written once and read back many times, and the two walks would have to agree on the order of the runs forever for the rows of an embedding to keep meaning what they meant. Reading the order the cloud recorded makes that agreement unnecessary.
Source code in src/hifuku/survey_io.py
ordination
¶
The stored embedding with this label.
Source code in src/hifuku/survey_io.py
add_ordination
¶
Keep an embedding of one cloud.
The embedding names the cloud it was built over and records that cloud's digests, so a later reader can tell whether the runs it describes are still here and still hold what they held.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
ndarray
|
|
required |
label
|
str
|
A name, unique within this survey. |
required |
method
|
str
|
How the embedding was produced. |
required |
cloud
|
Cloud
|
The cloud the rows belong to. Defaults to the whole survey, which materializes the default cloud. |
None
|
params
|
dict
|
What the method was given. |
None
|
faithfulness
|
Faithfulness
|
The score of this embedding. |
None
|
Returns:
| Type | Description |
|---|---|
Ordination
|
|
Source code in src/hifuku/survey_io.py
cloud_by_label
¶
The stored cloud with this label.
Source code in src/hifuku/survey_io.py
ordination_matrix
¶
The coordinates of a stored embedding, checked against its cloud.
An embedding describes the points of one cloud, and the cloud names its runs. Adding a run to the file therefore leaves this valid: the points it describes are still here and still hold what they held. A run that has gone, or one whose surveys now hold other trees, is the case this refuses, because the rows would then be read against points they do not describe.
Source code in src/hifuku/survey_io.py
save
¶
Write the whole survey to a new HDF5 file.
A file that exists is refused. A survey file holds run data, and run
data is never overwritten. Use :meth:append_run to add one run to a
file that already holds this framework.
Every record must be sealed and must match its seal, and every run must
match its id. A survey read with verify=False that does not match
is therefore refused here.
A survey with no label of its own takes the output file's stem, and any run with no label takes the survey's. Naming happens here because this is the first point at which the file has a name to borrow.
Raises:
| Type | Description |
|---|---|
FileExistsError
|
|
ProvenanceError
|
A record is not sealed, or a record or a run does not match its digests. |
Source code in src/hifuku/survey_io.py
append_run
¶
Add one run to a file that already holds this framework.
The framework in the file is authoritative. A run made in another framework is refused, with the diagnosis rather than the two digests, because that is the check the framework digest exists to make.
Nothing already in the file is read or rewritten, except the index, which is a table computed from the runs. A project file grown over months stays cheap to add a gene to.
Every record of the run must be sealed and must match its seal, and the run must match its id.
Source code in src/hifuku/survey_io.py
index
¶
One row per survey across every run.
Columns: run, label, chart, chart_label, gene, both
digests, seal, parent, n_filled, best_logL,
converged, halt_iter,
n_iters, seed, n_walkers, checkpoint_every,
capacity, n_dropped, cell, origin, device and
wall_seconds.
n_dropped above zero marks a survey whose archive filled: it holds
the region it covered and lost the rest, so it is not comparable with a
run of the same gene that had room. capacity is the room it had.
parent is AB_INITIO for a survey that started from nothing, and
otherwise the run it continues.
This is how a reader tells two runs of one gene apart without opening a
payload. label and chart_label are the names a person selects
by, and run and chart are the identities those names point at.
cell is here so that a coarse sketch is recognizable at a glance
beside a fine survey of the same gene. n_walkers is the shape the
engine ran each gene at, which on a device that sizes itself is a
property of the gene and the machine rather than of the batch.
index = survey.index() index.filter(pl.col("label") == "pass1").sort("best_logL")
Source code in src/hifuku/survey_io.py
load
classmethod
¶
Reconstruct a Survey from a file (the inverse of :meth:save).
A file holding a framework and no runs loads to a survey with no runs. That is a coordinate system nobody has surveyed in yet, which is a normal state of a project file rather than an error.
Every record is checked against its seal and every run against its id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verify
|
bool
|
False reads a file whose digests do not match, so that it can be examined. A survey read so cannot be saved unless it matches. |
True
|
Raises:
| Type | Description |
|---|---|
ValueError
|
The file, or a record in it, is of a version other than
|
ProvenanceError
|
A record or a run does not match its digests. |
Source code in src/hifuku/survey_io.py
Run
dataclass
¶
One batch of work done inside one framework.
A run carries the provenance of the process that produced it, including the digest of the framework it ran in, so that a run separated from its file still says which coordinate system it belongs to.
run_id is a digest over the framework, the work and the provenance. Two
runs of one batch on one host at different times differ, because the
provenance carries the time. That is deliberate: they are two runs and the
file keeps both.
Source code in src/hifuku/survey_io.py
group_name
property
¶
What this run is called in the file.
The label makes h5ls readable and the digest makes two runs of one
batch on one host distinct.
expected_id
¶
The run id that the framework, the seals and the provenance give.
record
¶
The record for one gene on one chart of this run.
Source code in src/hifuku/survey_io.py
SurveyRecord
dataclass
¶
One gene surveyed on one chart: the elite archive and its metadata.
gene is the surveyed alignment's label, independent of the chart anchors:
a gene may be surveyed on a chart it is not a vertex of.
The two digests are what let a reader tell duplicates apart. task_digest
says what was asked and result_digest says what came back, so two records
of one gene fall into one of three cases: the same question and the same
answer, which is a deterministic re-run; the same question and a different
answer, which is nondeterminism or a different engine; or two questions,
which both belong.
cell and origin are read from the archive rather than stored beside
it, so the record cannot disagree with the grid its niches are on.
n_walkers and checkpoint_every are the shape the engine ran this
gene at, which is not always the shape the batch named: an engine that sizes
itself to the device gives a wide alignment fewer walkers than a narrow one,
so two genes of one run may differ. Neither is part of the task digest,
because neither changes what the survey asked. Zero means a file written
before the shape was recorded.
Source code in src/hifuku/survey_io.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | |
n_dropped
property
¶
Niches the archive had no room for.
Read from the archive rather than stored beside it, on the same grounds
as cell: the record cannot then disagree with what it holds.
saturated
property
¶
True when the archive filled and dropped what it could not hold.
stamp_result
¶
Record what this survey produced, and return the digest.
Called once the archive is final. Two runs of one task that landed on the same elites get one digest, which is what makes a true duplicate recognizable as such.
Source code in src/hifuku/survey_io.py
BrokenLink
dataclass
¶
One illumination whose ancestry no longer holds.
reason is "changed" when the parent's seal or end state is not the
one this recorded, "missing" when the parent is not in the file,
"unsealed" when this illumination has no seal, and "ancestor" when
this illumination's own link is sound but something above it is not. See
:meth:Survey.check_lineage.
Source code in src/hifuku/survey_io.py
SurveyRun
¶
One batch of work, run inside a framework somebody else built.
:meth:prepare resolves the backend and the parameters and enumerates the
work; it does not read alignments, build trees or embed triangles, because
the framework already holds all three. That is what lets a framework be
built once and surveyed by many batches, on one machine or several.
framework = Framework.build(FrameworkSpec.from_toml("markers.toml"))
batch = Batch.from_toml("pass1.toml")
run = SurveyRun.prepare(batch, framework, device="cuda")
for task in run.tasks:
run.execute(task)
Survey(framework, [run.finish()]).save("markers.h5")
Source code in src/hifuku/survey_io.py
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 | |
prepare
classmethod
¶
Resolve the engine and the parameters, and enumerate the work.
backend defaults to the host or device backend that device
names. Inject one to run the orchestration against another engine.
The parameters the survey executes with are resolved against the backend's capability defaults, so each engine runs with the walker count and checkpoint cadence it wants. The task digests come from the batch and never see those defaults, so one batch keeps one identity wherever it runs.
survey is the project file that a work unit's resume names a run
in. A batch that continues nothing does not need it. The illuminations
to continue are read here, because what a task asks for includes where
it starts and that is hashed before any of it runs.
data_dirs names folders to search for an alignment that the
framework does not hold and that is not at its recorded path; see
:func:~hifuku.framework.alignment_source.
Source code in src/hifuku/survey_io.py
1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 | |
alignment
¶
The compressed alignment for one gene, read once and kept.
The bytes come from :func:~hifuku.framework.alignment_source: those
the framework holds, or a file found by the recorded digest, first at
the recorded path, then where the batch names it, then in the data
folders of this run. The digest is checked, because a different
alignment would put a survey on coordinates that do not describe it.
Source code in src/hifuku/survey_io.py
context
¶
The :class:~hifuku.backend.RunContext for one work unit.
Source code in src/hifuku/survey_io.py
execute
¶
Survey one gene on one chart and keep the record.
monitor reaches :func:~hifuku.driver.run_survey, which calls it at
every checkpoint. A monitor that names task receives this task.
Source code in src/hifuku/survey_io.py
record
¶
Return the record of the task that surveyed gene on chart,
or None before that task runs.
finish
¶
Assemble the executed records into a :class:Run.
A task that no call executed is left out, so a run holds what was done rather than what was asked.
Source code in src/hifuku/survey_io.py
timing
¶
What this run cost, keyed <step>/<clock>.
One span per gene, and a total that adds them. The genes do not
overlap, so adding them is meaningful.
Building the charts is not here. It is the framework's cost, paid once
however many batches run inside it, and
:attr:~hifuku.framework.Framework.timing carries it. Adding it to
each run would count one neighbor-joining pass once per batch.
Source code in src/hifuku/survey_io.py
Cloud
dataclass
¶
A named set of runs, and the points they hold.
Once one file holds two runs of a gene, "the cloud" names nothing: a point is a gene, a chart and a niche, and two runs supply that identity with different trees. A cloud fixes which runs are meant, so an embedding built over it keeps describing the same points after the file grows.
Attributes:
| Name | Type | Description |
|---|---|---|
label |
str
|
A name, unique within a survey, which also names the group in the file. |
run_ids |
tuple of str
|
The runs this cloud spans. |
identity |
tuple of tuple
|
|
cloud_digest |
str
|
Over the runs and the point identities: which points are here. |
content_digest |
str
|
Over the result digest of every survey the cloud spans: what is in them.
Kept apart from |
created |
str
|
UTC timestamp. |
Source code in src/hifuku/survey_io.py
CloudPoint
dataclass
¶
One elite tree in the survey cloud, with its provenance.
run_id is part of the provenance because one gene may have been surveyed
by more than one run, and the niche alone does not say which tree this is.
Source code in src/hifuku/survey_io.py
Ordination
dataclass
¶
One stored embedding of a cloud, with its provenance.
X[i] belongs to survey.points(cloud)[i]. That correspondence is by
position alone, so the record names the cloud it was built over and carries
that cloud's digests. :meth:Survey.ordination_matrix checks them, which
turns a survey whose runs have moved into a raised error rather than a
figure with the labels shuffled.
The check is at the point of use rather than at load. A file whose runs were split off elsewhere still opens and still reports what it holds, so a reader can see what an old embedding covered.
Attributes:
| Name | Type | Description |
|---|---|---|
label |
str
|
Name the caller gave this embedding, unique within a survey. |
method |
str
|
How it was produced, for example |
params |
dict
|
Whatever the method was given: a seed, a perplexity, and so on. |
X |
ndarray
|
|
faithfulness |
Faithfulness or None
|
The score of this embedding, when one was measured. |
created |
str
|
UTC timestamp. |
n_points |
int
|
Rows of |
cloud |
str
|
The label of that cloud. |
cloud_digest, content_digest |
str
|
The cloud's digests as they stood when the embedding was made. |