Closed Jianwei-Wu-1 closed 5 years ago
Hi Jianwei, Thank you for your interest in code2seq.
I hope it helps. Best, Uri
@urialon Thanks for the quick reply!
My program has roughly 189 lines of code. Sure, I will try to preprocess my long program and try again (I know the --test flag). I will let you know if I have any further issues.
Best, Jianwei Wu
Can you tell the specific line where it is referring to AWS lambda since i am not able to find it in the structure
Hi @Guardian99 , Also this is an old thread - this is the line that calls the path-extraction Lambda: https://github.com/tech-srl/code2seq/blob/master/extractor.py#L18
Best, Uri
How do i change it to a Localhost? Any help would be really appreciated.
I think that easiest solution will probably be running a Java subprocess, on your local host, that will extract paths (instead of sending the request to the remote lambda).
This subprocess can have a similar command to the command of the preprocessing step: https://github.com/tech-srl/code2seq/blob/master/JavaExtractor/extract.py#L26
Except that instead of a --dir
flag - give it a --file
flag, and the path of the input.java
file.
Traceback (most recent call last): File "code2seq.py", line 40, in
predictor.predict()
File "/Users/wujianwei/Desktop/code2seq/interactive_predict.py", line 35, in predict
predict_lines, pc_info_dict = self.path_extractor.extract_paths(user_input)
File "/Users/wujianwei/Desktop/code2seq/extractor.py", line 26, in extract_paths
raise TimeoutError(response.text)
TimeoutError: {"errorMessage":"2019-10-22T15:45:25.088Z 6b98c48f-5456-4690-9e5f-2b6e84894521 Task timed out after 19.02 seconds"}
-Error message.
Hi, researchers from tech-srl: I tried to use the default model to predict a long program, but instead of giving me predicted names, the tool gave me the error message above. I'm not sure how to fix it, and I already checked the code. I guess the JSON parser might not be able to parse large programs or I did something wrong?
Best, Jianwei Wu