mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
024fd95261
commit
0840c26e94
2 changed files with 5 additions and 8 deletions
|
|
@ -105,9 +105,7 @@ class TestAPICompression:
|
|||
"scores": [0.5 for _ in range(16)],
|
||||
"advantages": [[0.1 for _ in range(512)] for _ in range(16)],
|
||||
"ref_logprobs": [[0.2 for _ in range(512)] for _ in range(16)],
|
||||
"messages": [
|
||||
[{"role": "user", "content": "test" * 50}] for _ in range(16)
|
||||
],
|
||||
"messages": [[{"role": "user", "content": "test" * 50}] for _ in range(16)],
|
||||
}
|
||||
|
||||
post_response = requests.post(
|
||||
|
|
@ -157,7 +155,7 @@ class TestAPICompression:
|
|||
response = session.get(
|
||||
"http://localhost:8000/batch",
|
||||
headers={"Accept-Encoding": "gzip"},
|
||||
stream=True
|
||||
stream=True,
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
|
|
@ -201,7 +199,7 @@ class TestAPICompression:
|
|||
data = response.json()
|
||||
|
||||
uncompressed_json = json.dumps(data)
|
||||
uncompressed_size = len(uncompressed_json.encode('utf-8'))
|
||||
uncompressed_size = len(uncompressed_json.encode("utf-8"))
|
||||
|
||||
assert data["batch"] is not None
|
||||
batch = data["batch"][0]
|
||||
|
|
@ -257,8 +255,7 @@ class TestAPICompression:
|
|||
assert post_response.status_code == 200
|
||||
|
||||
status_response = requests.get(
|
||||
"http://localhost:8000/status-env",
|
||||
json={"env_id": env_id}
|
||||
"http://localhost:8000/status-env", json={"env_id": env_id}
|
||||
)
|
||||
assert status_response.status_code == 200
|
||||
status_data = status_response.json()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue