infercode icon indicating copy to clipboard operation
infercode copied to clipboard

AttributeError: 'InferCodeClient' object has no attribute 'ast_parser'

Open Avv22 opened this issue 2 years ago • 0 comments

Hello,

During running your model on based on your sample below:

from infercode.client.infercode_client import InferCodeClient
import os
import logging
logging.basicConfig(level=logging.INFO)

# Change from -1 to 0 to enable GPU
os.environ['CUDA_VISIBLE_DEVICES'] = "-1"

infercode = InferCodeClient(language="c")
infercode.init_from_config()
vectors = infercode.encode(["for (i = 0; i < n; i++)", "struct book{ int num; char s[27]; }shu[1000];"])

I over multiple strings of codes and it was giving output and stopped accidently after some iterations:

AttributeError: 'InferCodeClient' object has no attribute 'ast_parser'

Can you help with this please?

Avv22 avatar Dec 17 '21 01:12 Avv22