-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
bugSomething isn't workingSomething isn't workingpythonPull requests that update python codePull requests that update python code
Description
Name of sample affected
python/agents/machine-learning-engineering (MLE-STAR Agent)
Description of issue
The Machine Learning Engineering agent fails to execute custom tasks due to three distinct hardcoding and pathing issues.
- Hardcoded Default Task: In
sub_agents/initialization/agent.py, theprepare_taskfunction is hardcoded to look for "california-housing-prices" and a "task_description.txt" file, regardless of the actual task directory present or selected. - Hardcoded File Extension: The code expects
.txtdescriptions, while the sample data provided in the repo uses.md. - Incorrect Relative Paths: In both
sub_agents/initialization/agent.pyandsub_agents/ensemble/agent.py, thecreate_workspacefunction constructs file paths usingos.path.join(data_dir, task_name). This results in an incorrect path (e.g.,./machine_learning_engineering/tasks/diabetes) because the agent execution context is already at the project root. It should look fortasks/diabetes.
These issues prevent any custom task from running without manually editing the source code in multiple files.
Environment
- OS & Architecture: Linux (Google Colab / Ubuntu 22.04 x86_64)
- Python version: 3.12
- Java version: N/A (Python sample)
- Other: Poetry (latest)
Reproduction steps or code
- Clone the
adk-samplesrepository. - Navigate to
python/agents/machine-learning-engineering. - Install dependencies:
poetry install. - Create a custom task directory
tasks/diabetes(or any name) in the project root. - Add
train.csv,test.csv, anddescription.mdto that folder. - Run the agent:
adk run machine_learning_engineering. - At the prompt
[user]:, enter:execute the task.
Error log
Error 1 (Hardcoded task/file extension):
File "/.../sub_agents/initialization/agent.py", line 237, in prepare_task
task_description = open(
^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './machine_learning_engineering/tasks/california-housing-prices/task_description.txt'
Error 2 (Incorrect relative path after fixing Error 1):
File "/.../sub_agents/initialization/agent.py", line 287, in create_workspace
files = os.listdir(os.path.join(data_dir, task_name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './machine_learning_engineering/tasks/diabetes'
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpythonPull requests that update python codePull requests that update python code