dataloader checkpoint callback - #60
Conversation
| if self._is_s3_uri: | ||
| with tempfile.NamedTemporaryFile() as tmp_file: | ||
| temp_path = tmp_file.name | ||
| torch.save(dataloader.state_dict(), temp_path) |
There was a problem hiding this comment.
Just curious, about how large are the dataloader state dicts?
There was a problem hiding this comment.
I don't have an example on hand but I think they are pretty small since it just stores the item indices and some metadata about input_dir etc
There was a problem hiding this comment.
see here: https://github.com/Lightning-AI/litData/blob/06353697d17bd71f1bd1af3e47c5c3d5760a2e93/src/litdata/streaming/dataloader.py#L680
and here:
https://github.com/Lightning-AI/litData/blob/ee033833589ce82119892a1640fa0e3864061678/src/litdata/streaming/dataset.py#L438
|
|
||
| # Instantiate the model | ||
| if ckpt_path is not None: | ||
| self.model = FlexBERT.load_from_checkpoint(ckpt_path) |
There was a problem hiding this comment.
Good catch. So by default, always use Ume.load_from_checkpoint rather than specify a ckpt_path in model instantiation?
There was a problem hiding this comment.
yes exactly, ckpt_path in the model parameters is only needed because of this line: https://github.com/prescient-design/lobster/blob/main/src/lobster/cmdline/_train.py#L54
* dataloader callback * utils * ume * gitignore dev * tests
* peer fixes, add evaluate method * dataloader checkpoint callback (#60) * dataloader callback * utils * ume * gitignore dev * tests * update flash attention wheels (#61) * lock * torch 2.5 * torch 2.5 * part * .env * unpin flash attn (#62) * fix scheduler params (#64) * scheduler * fix scheduler * fix scheduler * Add AtomicaDataset (#63) Processed Atomica interactions dataset * Ume conversion/interaction tokenizer + fix SMILES and nucleotide tokenizers (#65) add two special tokens: <convert> and <interact> for later stages of Ume training: will be used as this: (or something like that) [CLS] PROT_SEQ [SEP] <convert> PROT_STRUCT(masked) [SEP] [CLS] PROT_SEQ [SEP] <interact> SMILES(masked) [SEP] extend functionality of UmeTokenizerTransform to handle dual modalities change the name of Ume embedding method and allow embedding from existing input_ids fix existing tokenizers: add lowercase normalized to nucleotide tokenizer (OG2 dataset contains a mix of upper and lowercase letters) BPE handled SMILES tokenization incorrectly, switch to WordLevel * Ume SMILES tokenizer fix (#66) * tokenizer * fix tests * lowercase normalizer for nt * tests * remove mod conv dataset * embed * Test * merge 2mod into UmeTokenizerTransform * fix tests * all * type hints * docstrings * tests * fix SMILES tokenizer * switch all tokenizer to BPE * Revert "switch all tokenizer to BPE" This reverts commit 367e77d. * tok * fix SMILES tokenizer * remove print statement * Ume perplexity logging (#67) * pplx * tests * src * ignore torchmetrics warnings * docstrings * docstrings * Update README.md (#69) * Ume fix perplexity device (#68) * pplx as attr * pplx as attr * pplx * comments * on step * comment * update tests, fix ruff * ruff * ruff ruff * Add <cls_modality> to Ume tokenizers (#71) * add <cls_modality> tokens * add <cls_modality> tokens * docstring * RNS metric implementation (#73) * add <cls_modality> tokens * add <cls_modality> tokens * modality embeddings * module dict * embeddings * tests * modality and device * rank zero only * rank zero * fix back modality mask * sync dist * RNS implementation * restore from main * restore * docstrings * docstrings * review * test * Ume modality-specific embeddings (#72) * add <cls_modality> tokens * add <cls_modality> tokens * modality embeddings * module dict * embeddings * tests * modality and device * rank zero only * rank zero * fix back modality mask * sync dist * add conversion transforms (#74) * add initial smiles to peptide and peptide to smiles transforms * remove smiles -> * transforms and touch up conversion functions * rename * add option to randomize smiles and caps --------- Co-authored-by: Colin Grambow <grambowc@gene.com> * fix def pad token, replace process_and_embed w/ ume.embed * update tests w -100 pad token --------- Co-authored-by: Taylor Joren <joren.taylor@gene.com> Co-authored-by: Karina Zadorozhny <karina.zadorozhny@gmail.com> Co-authored-by: Nathan Frey <ncfrey@users.noreply.github.com> Co-authored-by: Colin Grambow <17198155+cgrambow@users.noreply.github.com> Co-authored-by: Colin Grambow <grambowc@gene.com>
No description provided.