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, the prepare_task function 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
.txt descriptions, while the sample data provided in the repo uses .md.
- Incorrect Relative Paths: In both
sub_agents/initialization/agent.py and sub_agents/ensemble/agent.py, the create_workspace function constructs file paths using os.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 for tasks/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-samples repository.
- 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, and description.md to 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'
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.
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..txtdescriptions, while the sample data provided in the repo uses.md.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
Reproduction steps or code
adk-samplesrepository.python/agents/machine-learning-engineering.poetry install.tasks/diabetes(or any name) in the project root.train.csv,test.csv, anddescription.mdto that folder.adk run machine_learning_engineering.[user]:, enter:execute the task.Error log
Error 1 (Hardcoded task/file extension):
Error 2 (Incorrect relative path after fixing Error 1):