Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Config: Disable pagers by default (#1206)

Kilian Lieret47d425b954a1
diff --git a/config/coding_challenge.yaml b/config/coding_challenge.yaml
index b873cb4d..660e5847 100644
--- a/config/coding_challenge.yaml
+++ b/config/coding_challenge.yaml
@@ -85,6 +85,12 @@ agent:
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/windowed
diff --git a/config/default.yaml b/config/default.yaml
index dd6069f3..fb792081 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -31,6 +31,13 @@ agent:
next_step_no_output_template: |-
Your command ran successfully and did not produce any output.
tools:
+ env_variables:
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/edit_anthropic
diff --git a/config/default_backticks.yaml b/config/default_backticks.yaml
index 66bb9677..09ff379e 100644
--- a/config/default_backticks.yaml
+++ b/config/default_backticks.yaml
@@ -31,6 +31,13 @@ agent:
next_step_no_output_template: |-
Your command ran successfully and did not produce any output.
tools:
+ env_variables:
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/edit_anthropic
diff --git a/config/demo/default.yaml b/config/demo/default.yaml
index 180c7f8e..e2da1870 100644
--- a/config/demo/default.yaml
+++ b/config/demo/default.yaml
@@ -31,6 +31,13 @@ agent:
next_step_no_output_template: |-
Your command ran successfully and did not produce any output.
tools:
+ env_variables:
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/edit_anthropic
diff --git a/config/demo/no_instructions.yaml b/config/demo/no_instructions.yaml
index 41bc8858..193995f8 100644
--- a/config/demo/no_instructions.yaml
+++ b/config/demo/no_instructions.yaml
@@ -20,6 +20,13 @@ agent:
next_step_no_output_template: |-
Your command ran successfully and did not produce any output.
tools:
+ env_variables:
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/edit_anthropic
diff --git a/config/demo/only_bash.yaml b/config/demo/only_bash.yaml
index e1fc1199..84ad7b9b 100644
--- a/config/demo/only_bash.yaml
+++ b/config/demo/only_bash.yaml
@@ -31,6 +31,13 @@ agent:
next_step_no_output_template: |-
Your command ran successfully and did not produce any output.
tools:
+ env_variables:
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/submit
diff --git a/config/exotic/default_shell.yaml b/config/exotic/default_shell.yaml
index 4aefbd52..c2be820b 100644
--- a/config/exotic/default_shell.yaml
+++ b/config/exotic/default_shell.yaml
@@ -30,6 +30,13 @@ agent:
next_step_no_output_template: |-
Your command ran successfully and did not produce any output.
tools:
+ env_variables:
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/edit_anthropic
diff --git a/config/exotic/windowed_replace.yaml b/config/exotic/windowed_replace.yaml
index e51b1f64..4c125034 100644
--- a/config/exotic/windowed_replace.yaml
+++ b/config/exotic/windowed_replace.yaml
@@ -105,6 +105,12 @@ agent:
env_variables:
WINDOW: 100
OVERLAP: 2
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/windowed
diff --git a/config/exotic/windowed_replace_late_repro.yaml b/config/exotic/windowed_replace_late_repro.yaml
index fc195967..cb93f4a2 100644
--- a/config/exotic/windowed_replace_late_repro.yaml
+++ b/config/exotic/windowed_replace_late_repro.yaml
@@ -107,6 +107,12 @@ agent:
env_variables:
WINDOW: 100
OVERLAP: 2
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/windowed
diff --git a/config/human/human.yaml b/config/human/human.yaml
index 1c8cca3b..45e59e32 100644
--- a/config/human/human.yaml
+++ b/config/human/human.yaml
@@ -6,6 +6,12 @@ agent:
env_variables:
WINDOW: 100
OVERLAP: 2
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/windowed
diff --git a/config/human/human_demo.yaml b/config/human/human_demo.yaml
index 313bdda0..2e3242d3 100644
--- a/config/human/human_demo.yaml
+++ b/config/human/human_demo.yaml
@@ -31,6 +31,12 @@ agent:
env_variables:
WINDOW: 100
OVERLAP: 2
+ PAGER: cat
+ MANPAGER: cat
+ LESS: -R
+ PIP_PROGRESS_BAR: 'off'
+ TQDM_DISABLE: '1'
+ GIT_PAGER: cat
bundles:
- path: tools/registry
- path: tools/windowed
diff --git a/sweagent/tools/tools.py b/sweagent/tools/tools.py
index 8b79f69a..02ffc8a5 100644
--- a/sweagent/tools/tools.py
+++ b/sweagent/tools/tools.py
@@ -91,7 +91,14 @@ class ToolConfig(BaseModel):
so be careful with your API keys!
"""
- env_variables: dict[str, Any] = {}
+ env_variables: dict[str, Any] = {
+ "PAGER": "cat",
+ "MANPAGER": "cat",
+ "LESS": "-R",
+ "PIP_PROGRESS_BAR": "off",
+ "TQDM_DISABLE": "1",
+ "GIT_PAGER": "cat",
+ }
"""Shorthand to set environment variables for the tools, effectively
equivalent to adding `export VARNAME=value` to the `reset_commands`.
"""