Skip to content

TypeError in encoding.py: replace() argument 2 must be str, not None #2

Description

@SeongIk-Choi

Hi,

I'm running the generate.py script using the provided gen_configs.py, and I encountered the following error:

./lib/python3.11/site-packages/esm/utils/encoding.py", line 53, in tokenize_sequence
sequence = sequence.replace(C.MASK_STR_SHORT, sequence_tokenizer.mask_token)
TypeError: replace() argument 2 must be str, not None

It seems like sequence_tokenizer.mask_token is None during execution.
Do you have any insight into how to resolve this issue? Perhaps I am missing something when initializing the tokenizer?

Additionally, I tried to modify several parameters as mentioned in the inference script:

PDB name

substrate_smiles, product_smiles

n_pocket_res = 16, n_protein_res = 25

num_pocket_design_t = 25

However, changing these does not seem to have a clear effect or causes further errors.
Is there any guideline or recommendation for setting these parameters during inference?

Thanks in advance for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions