Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example generation is not running #4

Open
serbulent-av opened this issue Apr 26, 2023 · 1 comment
Open

Example generation is not running #4

serbulent-av opened this issue Apr 26, 2023 · 1 comment

Comments

@serbulent-av
Copy link

Hello,

The generation example produce error as;

python generate.py ckpts/HERN_gen.ckpt data/rabd/test_data.jsonl 1 > results/HERN.txt
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 58/58 [00:01<00:00, 49.16it/s]
0%| | 0/58 [00:24<?, ?it/s]
Traceback (most recent call last):
File "/home/serbulent_antiverse_io/code/abdockgen/generate.py", line 60, in
for cdr,ppl in new_res[:topk]:
TypeError: slice indices must be integers or None or have an index method

@Autumn-Roy
Copy link

This error is the type error, so I add the type transformer in the generate.py. This is my solution:

 topk = sys.argv[3]
    if not isinstance(topk, int):
        topk = int(topk)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants