Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #5748: Rename "Ran a Jupyter Command" to "Ran a Python Command" in UI #5749

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import glob
import json
import os
import random
from collections import Counter

import pandas as pd
import random
import numpy as np
import pandas as pd

from openhands.events.serialization import event_from_dict
from openhands.events.utils import get_pairs_from_events
Expand All @@ -20,12 +20,11 @@
]


def get_bootstrap_accuracy_error_bars(values: float | int | bool, num_samples: int = 1000, p_value=0.05) -> tuple[float, float]:
def get_bootstrap_accuracy_error_bars(
values: float | int | bool, num_samples: int = 1000, p_value=0.05
) -> tuple[float, float]:
sorted_vals = np.sort(
[
np.mean(random.sample(values, len(values) // 2))
for _ in range(num_samples)
]
[np.mean(random.sample(values, len(values) // 2)) for _ in range(num_samples)]
)
bottom_idx = int(num_samples * p_value / 2)
top_idx = int(num_samples * (1.0 - p_value / 2))
Expand Down Expand Up @@ -118,7 +117,9 @@ def process_file(file_path):
'resolved': {
'count': num_resolved,
'percentage': (num_resolved / num_lines * 100) if num_lines > 0 else 0,
'ci': tuple(x * 100 for x in get_bootstrap_accuracy_error_bars(resolved_arr)),
'ci': tuple(
x * 100 for x in get_bootstrap_accuracy_error_bars(resolved_arr)
),
},
'empty_patches': {
'count': num_empty_patch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface JupytrerCellInputProps {
export function JupytrerCellInput({ code }: JupytrerCellInputProps) {
return (
<div className="rounded-lg bg-gray-800 dark:bg-gray-900 p-2 text-xs">
<div className="mb-1 text-gray-400">EXECUTE</div>
<div className="mb-1 text-gray-400">Ran a Python Command</div>
neubig marked this conversation as resolved.
Show resolved Hide resolved
<pre
className="scrollbar-custom scrollbar-thumb-gray-500 hover:scrollbar-thumb-gray-400 dark:scrollbar-thumb-white/10 dark:hover:scrollbar-thumb-white/20 overflow-auto px-5"
style={{ padding: 0, marginBottom: 0, fontSize: "0.75rem" }}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/i18n/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2009,7 +2009,7 @@
"en": "Running a bash command"
},
"ACTION_MESSAGE$RUN_IPYTHON": {
"en": "Running a Jupyter command"
"en": "Running a Python command"
},
"ACTION_MESSAGE$READ": {
"en": "Reading the contents of a file"
Expand All @@ -2027,7 +2027,7 @@
"en": "Ran a bash command"
},
"OBSERVATION_MESSAGE$RUN_IPYTHON": {
"en": "Ran a Jupyter command"
"en": "Ran a Python command"
},
"OBSERVATION_MESSAGE$READ": {
"en": "Read the contents of a file"
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ reportlab = "*"
[tool.coverage.run]
concurrency = ["gevent"]


[tool.poetry.group.runtime.dependencies]
jupyterlab = "*"
notebook = "*"
Expand Down Expand Up @@ -129,6 +130,7 @@ ignore = ["D1"]
[tool.ruff.lint.pydocstyle]
convention = "google"


[tool.poetry.group.evaluation.dependencies]
streamlit = "*"
whatthepatch = "*"
Expand Down
Loading