Open linjie7674 opened 3 months ago
I cannot reproduce the issue. Can you please provide your OS information, the python version and the commit id of the repository huggingface/diffusers
?
I cannot reproduce the issue. Can you please provide your OS information, the python version and the commit id of the repository
huggingface/diffusers
?
My OS is Ubuntu 20.04.4 LTS
, python version is 3.10.14
, and the repository huggingface/diffusers
I used comes from https://github.com/microsoft/CodeT/blob/main/RepoCoder/repositories/line_and_api_level.zip
When I use the CrossCodeEval dataset and the raw data, there is also same problem.
The error information is as follows:
2024-09-05 11:51:10,853 - dependency_graph.graph_generator.jedi_generator - ERROR - Error while extracting d
ef-use relation for name <Name full_name='examples.door_puzzle.ax', description='ax = plt.gca()'> in /home/l
inshaoxin/dong/jie/datasets/crosscodeeval/crosscodeeval_rawdata/yotakayama-STLCCP-edcfad4/examples/door_puzz
le.py: Error PosixPath('/home/linshaoxin/dong/jie/datasets/crosscodeeval/crosscodeeval_rawdata/yotakayama-ST
LCCP-edcfad4/examples/door_puzzle.py') occurred at:
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/dependency_graph/graph_generator/jedi_gen
erator.py", line 358, in _extract_def_use_relation
references = script.get_references(name.line, name.column)
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/api/helpers.py", line 487, in wrappe
r
return func(self, line, column, *args, **kwargs)
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/api/__init__.py", line 429, in get_r
eferences
return _references(**kwargs)
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/api/__init__.py", line 423, in _refe
rences
names = find_references(self._get_module_context(), tree_name, scope == 'file')
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/inference/references.py", line 122,
in find_references
found_names = _find_defining_names(module_context, tree_name)
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/inference/references.py", line 63, i
n _find_defining_names
found_names |= set(_find_global_variables(found_names, tree_name.value))
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/inference/references.py", line 63, in _find_defining_names
found_names |= set(_find_global_variables(found_names, tree_name.value))
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/inference/references.py", line 108, in _find_global_variables
for global_name in method().get(search_name):
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/inference/context.py", line 330, in get_global_filter
return GlobalNameFilter(self)
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/inference/filters.py", line 100, in __init__
self._parso_cache_node = get_parso_cache_node(
File "/root/miniconda3/envs/rag_llm/lib/python3.10/site-packages/jedi/parser_utils.py", line 287, in get_parso_cache_node
return parser_cache[grammar._hashed][path]
It seems to me the third-party dependencies required for the repository are not installed, causing Jedi to be unable to resolve the symbol and raise an error.
This is normal because we only want to retrieve context at the repository level without including third-party dependencies. The errors are properly handled and should not affect the result.
When I use repofuse code in my own dataset, I have modified the format of the dataset according to the jsonl file you provided and provided the corresponding code repository. An error is reported when the following code is executed, and most of the extracted
crossfile_definition_by_dependency_graph
andcrossfile_reference_by_dependency_graph
are empty.The following is the error information: