-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG] enhance list_files
function
#252
Conversation
list_files
function
Nice one @leeeizhang ! |
You need to change the function call schema as well since the parameters are changed @leeeizhang |
Another thing is that we don't know if the tree-printing structure is a good format for LLMs to understand, previously I just returned abs paths in a list. We need more tests for this format (personally I don't think this is a good format, so this PR may result in a negative optimization) |
The function contains bugs: [MLE FUNC CALL]: list_files
Traceback (most recent call last):
File "/Users/huangyz0918/miniconda3/envs/mle/bin/mle", line 33, in <module>
sys.exit(load_entry_point('mle-agent', 'console_scripts', 'mle')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/miniconda3/envs/mle/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/miniconda3/envs/mle/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/miniconda3/envs/mle/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/miniconda3/envs/mle/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/miniconda3/envs/mle/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/Desktop/MLE-agent/mle/cli.py", line 155, in kaggle
return workflow.auto_kaggle(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/Desktop/MLE-agent/mle/workflow/kaggle.py", line 109, in auto_kaggle
code_report = coder.debug(coding_task, debug_report)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/Desktop/MLE-agent/mle/agents/coder.py", line 200, in debug
text = self.model.query(
^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/Desktop/MLE-agent/mle/model/__init__.py", line 39, in query
return self.model.query(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/Desktop/MLE-agent/mle/model/openai.py", line 66, in query
result = get_function(function_name)(**arguments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/Desktop/MLE-agent/mle/function/files.py", line 141, in list_files
return f"{Path(path).absolute()}\n" + list_directories(path, max_depth - 1, max_items)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/huangyz0918/Desktop/MLE-agent/mle/function/files.py", line 78, in list_directories
for item in os.listdir(path): I am going to revert this function and then re-think how to improve the preview things |
Before submitting this PR, please make sure you have:
the credit file.