#118 action plan should include multiple files#119
Conversation
…ould-include-multiple-files # Conflicts: # libs/core/deep_next/core/steps/action_plan/action_plan.py # libs/core/deep_next/core/steps/gather_project_knowledge/project_description/generate_project_description.py # libs/core/deep_next/core/steps/implement/develop_patch.py
…ould-include-multiple-files # Conflicts: # libs/common/deep_next/common/llm.py # libs/core/deep_next/core/steps/action_plan/action_plan.py # libs/core/deep_next/core/steps/action_plan/srf/file_selection/graph.py # libs/core/deep_next/core/steps/gather_project_knowledge/project_description/generate_project_description.py
…ould-include-multiple-files # Conflicts: # libs/core/deep_next/core/steps/action_plan/srf/file_selection/utils.py
…ould-include-multiple-files # Conflicts: # libs/core/deep_next/core/graph.py # libs/core/deep_next/core/steps/action_plan/action_plan.py # libs/core/deep_next/core/steps/implement/apply_patch/apply_patch.py # llm-config.yaml
| seed (int | None): Optional seed for reproducibility. If provided, it will be | ||
| added to the base seed from the config (as long as the config seed is not | ||
| None. If the config seed is not provided, this value will be used as seed | ||
| itself). |
There was a problem hiding this comment.
way too complicated. I'd stick with config based seed and if config seed is something like -1 then we do random. All retry mechanism might just implement +1 mechanism to the config seed. What do you think?
| issue_comments=issue_comments, | ||
| ) | ||
|
|
||
| def steps_to_str(self, steps: list[Step]): |
| related_code_context = "\n".join( | ||
| [f"File: {file_path}\n{read_txt(file_path)}" for file_path in related_files] | ||
| [ | ||
| f"File: {path}\n{read_txt_or_none(path) or '<Failed to read file>'}" |
There was a problem hiding this comment.
that might be an issue with files. From my perspective silent exception is a big problem. What do You think of making it regular loop and do the error handling here? read_txt_or_none is created in core.io only for this one usage, isn't that unnecessary?
There was a problem hiding this comment.
No problem, but what would you like to do with an FileNotFound exception in the loop? Raise a warning, or something else?
There was a problem hiding this comment.
Log warning if byte object or if file not found
|
|
||
| for step in action_plan.ordered_steps: | ||
| for target_file in step.target_files: | ||
| abs_path = root_path / target_file |
There was a problem hiding this comment.
why not to keep try_to_resolve_path?
| FileCodeContext( | ||
| path=relevant_file.path, | ||
| code_snippet=read_txt(relevant_file.path), | ||
| code_snippet=read_txt(state.root_path / relevant_file.path), |
There was a problem hiding this comment.
that is also a good candidate for try_to_resolve_path
| if (seed := config.seed) is None: | ||
| seed += seed_increment |
There was a problem hiding this comment.
I guess it will fail None += seed_increment, shouldn't be not None?
Closes #118