Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
Transformers MolFeat notebook (#11)
Browse files Browse the repository at this point in the history
** TODO:**
- [x] Add the actual requirements 
- [x] Polish model + fine tuning cells + text
- [x] Check the visualisations / interaction are working as expect on
PaperSpace
- [x] Fix `Run
trilom/file-changes-action@a6ca26c;
Error: undefined` error

---------

Co-authored-by: Alexandre Payot <[email protected]>
  • Loading branch information
s-maddrellmander and payoto authored May 22, 2023
1 parent 308a0c3 commit 5c435d7
Show file tree
Hide file tree
Showing 5 changed files with 849 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .gradient/notebook-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,11 @@ packed-bert-single-label-classification:
notebook:
file: packedBERT_single_label_text_classification.ipynb
timeout: 10000

#MolFeat Transformer
molfeat:
location: ../molfeat
generated: true
notebook:
file: transformers_molfeat_finetune.ipynb
timeout: 1000
3 changes: 2 additions & 1 deletion dolly2-instruction-following/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,14 @@ def __init__(
tokenizer: Optional[AutoTokenizer] = None,
prompt_format: Optional[str] = None,
end_key: Optional[str] = None,
task=None,
**kwargs,
) -> None:
if sequence_length is not None:
config.model.sequence_length = sequence_length
if micro_batch_size is not None:
config.execution.micro_batch_size = micro_batch_size

self.task = "text-generation"
logging.info(f"Creating session")
session: popxl.Session = inference(config)
if isinstance(hf_dolly_checkpoint, str):
Expand Down
13 changes: 13 additions & 0 deletions molfeat/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ipywidgets==8.0.6
awscli==1.27.76
matplotlib==3.7.1
molfeat==0.8.8
transformers==4.28.1
tabulate==0.9.0
seaborn==0.12.2
stmol
rdkit==2023.3.1
py3Dmol==2.0.1.post1
torchinfo==1.7.2
numpy
examples-utils[common] @ git+https://github.com/graphcore/examples-utils@latest_stable
Loading

0 comments on commit 5c435d7

Please sign in to comment.