Skip to content

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

@Avv22

Description

@Avv22

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?

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