Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix typos (#2352)

RainRat745ae42a72e8
diff --git a/evaluation/EDA/game.py b/evaluation/EDA/game.py
index 1c057ca8f8..b0f86ec2e7 100644
--- a/evaluation/EDA/game.py
+++ b/evaluation/EDA/game.py
@@ -181,7 +181,7 @@ class Q20GameCelebrity(Q20Game):
user_messages = [
{
'role': 'system',
- 'content': f'Based on on your knowledge about the celebrity: {self.item}, '
+ 'content': f'Based on your knowledge about the celebrity: {self.item}, '
f'respond to the following question or guess. '
f"Limit your respond to only 'Yes.', 'No.' or 'Dunno.', with no explanation or other words. "
f"Never say the name {self.item} in your response. Do not say 'Dunno.' if it can be answered by 'Yes.' or 'No.' "
diff --git a/evaluation/EDA/run_infer.py b/evaluation/EDA/run_infer.py
index 1d168e8f72..984d307e84 100644
--- a/evaluation/EDA/run_infer.py
+++ b/evaluation/EDA/run_infer.py
@@ -45,7 +45,7 @@ def codeact_user_response(state: State) -> str:
msg = game.generate_user_response(model_guess)
game.curr_turn += 1
logger.info(f'Model guess: {model_guess}')
- logger.info(f'Anwser response: {msg}')
+ logger.info(f'Answer response: {msg}')
if 'bingo!' in msg.lower():
return '/exit'
return msg
diff --git a/evaluation/agent_bench/run_infer.py b/evaluation/agent_bench/run_infer.py
index a61411a414..8a59a8d5c1 100644
--- a/evaluation/agent_bench/run_infer.py
+++ b/evaluation/agent_bench/run_infer.py
@@ -109,7 +109,7 @@ def process_instance(
# add back the console handler to print ONE line
logger.addHandler(get_console_handler())
logger.info(
- f'Starting evaluation for instance {inst_id}.\nHint: run "tail -f {log_file}" to see live logs in a seperate shell'
+ f'Starting evaluation for instance {inst_id}.\nHint: run "tail -f {log_file}" to see live logs in a separate shell'
)
# Remove all existing handlers from logger
for handler in logger.handlers[:]:
diff --git a/evaluation/gorilla/ast_eval_hf.py b/evaluation/gorilla/ast_eval_hf.py
index 1c3ce6e3c7..25229aee74 100644
--- a/evaluation/gorilla/ast_eval_hf.py
+++ b/evaluation/gorilla/ast_eval_hf.py
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-# This file is modifed from https://github.com/ShishirPatil/gorilla/blob/main/eval/eval-scripts/ast_eval_hf.py
+# This file is modified from https://github.com/ShishirPatil/gorilla/blob/main/eval/eval-scripts/ast_eval_hf.py
from tree_sitter import Language, Parser
diff --git a/evaluation/gorilla/ast_eval_tf.py b/evaluation/gorilla/ast_eval_tf.py
index 4bfbeaca38..22067010c1 100644
--- a/evaluation/gorilla/ast_eval_tf.py
+++ b/evaluation/gorilla/ast_eval_tf.py
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-# This file is modifed from https://github.com/ShishirPatil/gorilla/blob/main/eval/eval-scripts/ast_eval_tf.py
+# This file is modified from https://github.com/ShishirPatil/gorilla/blob/main/eval/eval-scripts/ast_eval_tf.py
from tree_sitter import Language, Parser
diff --git a/evaluation/gorilla/ast_eval_th.py b/evaluation/gorilla/ast_eval_th.py
index 4da8777c16..f55f70ed7c 100644
--- a/evaluation/gorilla/ast_eval_th.py
+++ b/evaluation/gorilla/ast_eval_th.py
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-# This file is modifed from https://github.com/ShishirPatil/gorilla/blob/main/eval/eval-scripts/ast_eval_th.py
+# This file is modified from https://github.com/ShishirPatil/gorilla/blob/main/eval/eval-scripts/ast_eval_th.py
from tree_sitter import Language, Parser
diff --git a/evaluation/gorilla/run_infer.py b/evaluation/gorilla/run_infer.py
index df3fe34c4f..b0ae68e803 100644
--- a/evaluation/gorilla/run_infer.py
+++ b/evaluation/gorilla/run_infer.py
@@ -120,7 +120,7 @@ def process_instance(
)
)
# ======= Attempt to evaluate the agent's edits =======
- # If you are working on simplier benchmark that only evaluates the final model output (e.g., in a MessageAction)
+ # If you are working on simpler benchmark that only evaluates the final model output (e.g., in a MessageAction)
# You can simply get the LAST `MessageAction` from the returned `state.history` and parse it for evaluation.
if state is None:
@@ -167,7 +167,7 @@ if __name__ == '__main__':
parser.add_argument(
'--hubs',
type=str,
- help='Which hubs to evaluate from APIBench. APIBench contains 3 hubs, namely huggingface, torch, and tensorflow. You could choose one or more from hf, torch, or tf, seperated by commas. For example, the default is --hub hf,torch,tf.',
+ help='Which hubs to evaluate from APIBench. APIBench contains 3 hubs, namely huggingface, torch, and tensorflow. You could choose one or more from hf, torch, or tf, separated by commas. For example, the default is --hub hf,torch,tf.',
default='hf,torch,tf',
)
args, _ = parser.parse_known_args()
diff --git a/evaluation/gpqa/run_infer.py b/evaluation/gpqa/run_infer.py
index 28b6a3b45b..37072fe7bd 100644
--- a/evaluation/gpqa/run_infer.py
+++ b/evaluation/gpqa/run_infer.py
@@ -191,7 +191,7 @@ def process_instance(
# workspace_mount_path = os.path.join(workspace_mount_path, str(os.getpid()))
# pathlib.Path(workspace_mount_path).mkdir(parents=True, exist_ok=True)
- # Setup the logger properly, so you can run multi-processing to parallize the evaluation
+ # Setup the logger properly, so you can run multi-processing to parallelize the evaluation
if reset_logger:
# Set up logger
log_file = os.path.join(
@@ -203,7 +203,7 @@ def process_instance(
# add back the console handler to print ONE line
logger.addHandler(get_console_handler())
logger.info(
- f'Starting evaluation for instance {instance.instance_id}.\nHint: run "tail -f {log_file}" to see live logs in a seperate shell'
+ f'Starting evaluation for instance {instance.instance_id}.\nHint: run "tail -f {log_file}" to see live logs in a separate shell'
)
# Remove all existing handlers from logger
for handler in logger.handlers[:]:
diff --git a/evaluation/miniwob/run_infer.py b/evaluation/miniwob/run_infer.py
index 06ef30b89e..a1cc16eb26 100644
--- a/evaluation/miniwob/run_infer.py
+++ b/evaluation/miniwob/run_infer.py
@@ -29,7 +29,7 @@ def process_instance(
docker_sandbox: DockerSSHBox,
reset_logger: bool = True,
):
- # Setup the logger properly, so you can run multi-processing to parallize the evaluation
+ # Setup the logger properly, so you can run multi-processing to parallelize the evaluation
if reset_logger:
# Set up logger
log_file = os.path.join(eval_output_dir, 'logs', f'instance_{env_id}.log')
@@ -39,7 +39,7 @@ def process_instance(
# add back the console handler to print ONE line
logger.addHandler(get_console_handler())
logger.info(
- f'Starting evaluation for instance {env_id}.\nHint: run "tail -f {log_file}" to see live logs in a seperate shell'
+ f'Starting evaluation for instance {env_id}.\nHint: run "tail -f {log_file}" to see live logs in a separate shell'
)
# Remove all existing handlers from logger
for handler in logger.handlers[:]:
@@ -146,7 +146,7 @@ if __name__ == '__main__':
'max_iterations': max_iterations,
'eval_output_dir': eval_output_dir,
'start_time': time.strftime('%Y-%m-%d %H:%M:%S'),
- # get the commit id of current repo for reproduciblity
+ # get the commit id of current repo for reproducibility
'git_commit': subprocess.check_output(['git', 'rev-parse', 'HEAD'])
.decode('utf-8')
.strip(),
diff --git a/evaluation/ml_bench/run_infer.py b/evaluation/ml_bench/run_infer.py
index 199e6552c3..76216b77a6 100644
--- a/evaluation/ml_bench/run_infer.py
+++ b/evaluation/ml_bench/run_infer.py
@@ -116,7 +116,7 @@ def process_instance(
config.workspace_base = workspace_mount_path
config.workspace_mount_path = workspace_mount_path
- # Setup the logger properly, so you can run multi-processing to parallize the evaluation
+ # Setup the logger properly, so you can run multi-processing to parallelize the evaluation
if reset_logger:
# Set up logger
log_file = os.path.join(
@@ -305,7 +305,7 @@ if __name__ == '__main__':
'max_iterations': max_iterations,
'eval_output_dir': eval_output_dir,
'start_time': time.strftime('%Y-%m-%d %H:%M:%S'),
- # get the commit id of current repo for reproduciblity
+ # get the commit id of current repo for reproducibility
'git_commit': subprocess.check_output(['git', 'rev-parse', 'HEAD'])
.decode('utf-8')
.strip(),
diff --git a/evaluation/toolqa/run_infer.py b/evaluation/toolqa/run_infer.py
index 53a8b4aaef..03215e68dc 100644
--- a/evaluation/toolqa/run_infer.py
+++ b/evaluation/toolqa/run_infer.py
@@ -70,7 +70,7 @@ def process_instance(task, agent_class, metadata, reset_logger: bool = True):
workspace_mount_path = config.workspace_mount_path
pathlib.Path(workspace_mount_path).mkdir(parents=True, exist_ok=True)
- # Setup the logger properly, so you can run multi-processing to parallize the evaluation
+ # Setup the logger properly, so you can run multi-processing to parallelize the evaluation
eval_output_dir = metadata['eval_output_dir']
qid = task['qid']
question = task['question']
@@ -84,7 +84,7 @@ def process_instance(task, agent_class, metadata, reset_logger: bool = True):
# add back the console handler to print ONE line
logger.addHandler(get_console_handler())
logger.info(
- f'Starting evaluation for instance {qid}.\nHint: run "tail -f {log_file}" to see live logs in a seperate shell'
+ f'Starting evaluation for instance {qid}.\nHint: run "tail -f {log_file}" to see live logs in a separate shell'
)
# Remove all existing handlers from logger
for handler in logger.handlers[:]:
@@ -111,7 +111,7 @@ def process_instance(task, agent_class, metadata, reset_logger: bool = True):
)
)
# ======= Attempt to evaluate the agent's edits =======
- # If you are working on simplier benchmark that only evaluates the final model output (e.g., in a MessageAction)
+ # If you are working on simpler benchmark that only evaluates the final model output (e.g., in a MessageAction)
# You can simply get the LAST `MessageAction` from the returned `state.history` and parse it for evaluation.
if state is None:
diff --git a/evaluation/webarena/run_infer.py b/evaluation/webarena/run_infer.py
index 77db210959..bd172b977e 100644
--- a/evaluation/webarena/run_infer.py
+++ b/evaluation/webarena/run_infer.py
@@ -29,7 +29,7 @@ def process_instance(
docker_sandbox: DockerSSHBox,
reset_logger: bool = True,
):
- # Setup the logger properly, so you can run multi-processing to parallize the evaluation
+ # Setup the logger properly, so you can run multi-processing to parallelize the evaluation
if reset_logger:
# Set up logger
log_file = os.path.join(eval_output_dir, 'logs', f'instance_{env_id}.log')
@@ -39,7 +39,7 @@ def process_instance(
# add back the console handler to print ONE line
logger.addHandler(get_console_handler())
logger.info(
- f'Starting evaluation for instance {env_id}.\nHint: run "tail -f {log_file}" to see live logs in a seperate shell'
+ f'Starting evaluation for instance {env_id}.\nHint: run "tail -f {log_file}" to see live logs in a separate shell'
)
# Remove all existing handlers from logger
for handler in logger.handlers[:]:
@@ -146,7 +146,7 @@ if __name__ == '__main__':
'max_iterations': max_iterations,
'eval_output_dir': eval_output_dir,
'start_time': time.strftime('%Y-%m-%d %H:%M:%S'),
- # get the commit id of current repo for reproduciblity
+ # get the commit id of current repo for reproducibility
'git_commit': subprocess.check_output(['git', 'rev-parse', 'HEAD'])
.decode('utf-8')
.strip(),