torchcell.datasets.RandomEmbeddingDataset

class RandomEmbeddingDataset(root: str, genome: SCerevisiaeGenome, model_name: str | None = 'random_1000', transform: Callable[[...], Any] | None = None, pre_transform: Callable[[...], Any] | None = None, batch_size: int = 100)[source]

Bases: BaseEmbeddingDataset

Embedding dataset assigning each gene a random feature vector.

static parse_genome(genome: SCerevisiaeGenome | None) → ParsedGenome | None[source]

Return a ParsedGenome holding the genome’s gene set, or None.

initialize_model() → Any[source]

Raise; random embeddings need no model initialization.

property partial_path: str

Path of the in-progress chunk file, beside (never at) the final store.

process() → None[source]

Generate random embeddings per gene and save them in batched chunks.

Rows are drawn from a private torch.Generator seeded with 42, so the store is the seed-42 stream and the caller’s global RNG is left untouched. Chunks are written to partial_path; a chunk file left by an interrupted build is removed with a warning, since the build restarts at the first gene.