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:
BaseEmbeddingDatasetEmbedding 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.
- process() None[source]
Generate random embeddings per gene and save them in batched chunks.
Rows are drawn from a private
torch.Generatorseeded with 42, so the store is the seed-42 stream and the caller’s global RNG is left untouched. Chunks are written topartial_path; a chunk file left by an interrupted build is removed with a warning, since the build restarts at the first gene.