How to initial two InferCodeClient with different languages?
allomy opened this issue · comments
allomy commented
Hi, I tried to use InferCode to generate vectors for java and c languages, and I want to initial two InferCodeClient
s as the following code shows, but at line 6 infercode_c_predictor.init_from_config()
will give the following exception.
from infercode.client.infercode_client import InferCodeClient
infercode_java_predictor = InferCodeClient(language="java")
infercode_java_predictor.init_from_config()
infercode_c_predictor = InferCodeClient(language="c")
infercode_c_predictor.init_from_config() // Line 6
// Error Message
Exception has occurred: NotFoundError
Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
Key dense_2/kernel not found in checkpoint
[[node save_1/RestoreV2 (defined at /home/******/.local/lib/python3.8/site-packages/infercode/client/infercode_client.py:45) ]]
......
So is there anyway that I get two InferCodeClient
s with different languages at the same time?
Thank you for your help in advance.
allomy commented
Hi, is this repo still being updated?
刘家园 commented
maybe add "tf.reset_default_graph()" before creating the second InferCodeClient can solve this problem