Skip to content

Commit 1b0f95a

Browse files
raymyersshabbir-shakudo
authored andcommitted
chore - Remove unneeded dependencies from main poetry (All-Hands-AI#7772)
1 parent 753b5d5 commit 1b0f95a

File tree

3 files changed

+27
-65
lines changed

3 files changed

+27
-65
lines changed

openhands/resolver/utils.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import json
21
import logging
32
import multiprocessing as mp
43
import os
@@ -7,7 +6,6 @@
76
from typing import Callable
87

98
import httpx
10-
import pandas as pd
119

1210
from openhands.controller.state.state import State
1311
from openhands.core.logger import get_console_handler
@@ -134,43 +132,6 @@ def cleanup() -> None:
134132
process.join()
135133

136134

137-
def prepare_dataset(
138-
dataset: pd.DataFrame, output_file: str, eval_n_limit: int
139-
) -> pd.DataFrame:
140-
assert 'instance_id' in dataset.columns, (
141-
"Expected 'instance_id' column in the dataset. You should define your own "
142-
"unique identifier for each instance and use it as the 'instance_id' column."
143-
)
144-
id_column = 'instance_id'
145-
logger.info(f'Writing evaluation output to {output_file}')
146-
finished_ids = set()
147-
if os.path.exists(output_file):
148-
with open(output_file, 'r') as f:
149-
for line in f:
150-
data = json.loads(line)
151-
finished_ids.add(data[id_column])
152-
logger.warning(
153-
f'Output file {output_file} already exists. Loaded '
154-
f'{len(finished_ids)} finished instances.'
155-
)
156-
157-
if eval_n_limit:
158-
dataset = dataset.head(eval_n_limit)
159-
logger.info(f'Limiting evaluation to first {eval_n_limit} instances.')
160-
161-
new_dataset = [
162-
instance
163-
for _, instance in dataset.iterrows()
164-
if instance[id_column] not in finished_ids
165-
]
166-
logger.info(
167-
f'Finished instances: {len(finished_ids)}, '
168-
f'Remaining instances: {len(new_dataset)}'
169-
)
170-
171-
return pd.DataFrame(new_dataset)
172-
173-
174135
def reset_logger_for_multiprocessing(
175136
logger: logging.Logger, instance_id: str, log_dir: str
176137
) -> None:

poetry.lock

Lines changed: 24 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@ packages = [
1414

1515
[tool.poetry.dependencies]
1616
python = "^3.12"
17-
datasets = "*"
18-
pandas = "*"
1917
litellm = "^1.60.0"
2018
aiohttp = ">=3.9.0,!=3.11.13" # Pin to avoid yanked version 3.11.13
2119
google-generativeai = "*" # To use litellm with Gemini Pro API
2220
google-api-python-client = "^2.164.0" # For Google Sheets API
2321
google-auth-httplib2 = "*" # For Google Sheets authentication
2422
google-auth-oauthlib = "*" # For Google Sheets OAuth
2523
termcolor = "*"
26-
seaborn = "*"
2724
docker = "*"
2825
fastapi = "*"
2926
toml = "*"
@@ -39,8 +36,6 @@ jinja2 = "^3.1.3"
3936
python-multipart = "*"
4037
boto3 = "*"
4138
minio = "^7.2.8"
42-
gevent = "^24.2.1"
43-
pyarrow = "19.0.1" # transitive dependency, pinned here to avoid conflicts
4439
tenacity = ">=8.5,<10.0"
4540
zope-interface = "7.2"
4641
pathspec = "^0.12.1"
@@ -96,6 +91,7 @@ pytest-xdist = "*"
9691
openai = "*"
9792
pandas = "*"
9893
reportlab = "*"
94+
gevent = "^24.2.1"
9995

10096
[tool.coverage.run]
10197
concurrency = ["gevent"]
@@ -149,6 +145,8 @@ browsergym-webarena = "0.13.3"
149145
browsergym-miniwob = "0.13.3"
150146
browsergym-visualwebarena = "0.13.3"
151147
boto3-stubs = {extras = ["s3"], version = "^1.37.19"}
148+
pyarrow = "19.0.1" # transitive dependency, pinned here to avoid conflicts
149+
datasets = "*"
152150

153151
[tool.poetry-dynamic-versioning]
154152
enable = true

0 commit comments

Comments
 (0)