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

Commit

Permalink
debug further
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasTR committed Apr 14, 2023
1 parent 2fb307a commit 2bb55c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions installer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# build container
docker build containerfold -t containerfold:blank
docker build protbert -t protbert --no-cache

# check if the model weights exist in the container directory
if [ ! -d containerfold/params ]; then
Expand Down
1 change: 1 addition & 0 deletions protbert/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN pip install -r requirements.txt

COPY . .

# test battery
RUN python3 app.py test.fasta /test --mode embedding
RUN python3 app.py test.fasta /test --mode fill-mask
RUN python3 app.py test.fasta /test --mode conditional-probability
Expand Down
4 changes: 2 additions & 2 deletions protbert/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def generate(record, tokenizer, generator_model, output_path, max_length=50, top
def main(
input: str = typer.Argument(..., help="Path to the input fasta file."),
output_path: str = typer.Argument(..., help="Path to the output directory."),
huggingface_model_name: str = typer.Argument("Rostlab/prot_bert", help="The model name to use. Supply a Hugginface identifier. Default is 'Rostlab/prot_bert'."),
huggingface_model_name: str = typer.Argument("Rostlab/prot_bert_bfd", help="The model name to use. Supply a Hugginface identifier. Default is 'Rostlab/prot_bert'."),
mode: str = typer.Option(
...,
help="Mode of operation. Choose from 'embedding', 'fill-mask', 'conditional-probability', 'joint-probability', or 'generate'.",
Expand Down Expand Up @@ -152,7 +152,7 @@ def main(
elif mode == "fill-mask":
fill_mask(record, unmasker, output_path)
elif mode == "conditional-probability":
generate_scoring_matrix(record, tokenizer, masked_model, output_path)
conditional_probability_matrix(record, tokenizer, masked_model, output_path)
elif mode == "joint-probability":
joint_probability_score()
elif mode == "generate":
Expand Down

0 comments on commit 2bb55c6

Please sign in to comment.