Skip to content

Commit c3be8e7

Browse files
committed
refactor constants out, lint
1 parent a443acd commit c3be8e7

5 files changed

Lines changed: 1253 additions & 1207 deletions

File tree

‎rlm/constants/__init__.py‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎rlm/environments/modal_repl.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import modal
88
import requests
99

10-
from rlm.constants.repl import APT_PACKAGES, PIP_PACKAGES
1110
from rlm.core.comms_utils import LMRequest, send_lm_request, send_lm_request_batched
1211
from rlm.core.types import REPLResult, RLMChatCompletion
1312
from rlm.environments.base_env import IsolatedEnv
13+
from rlm.environments.constants import APT_PACKAGES, PIP_PACKAGES
1414

1515
# =============================================================================
1616
# Default Modal Image

‎rlm/environments/prime_repl.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,20 @@
1313
from typing import Any
1414

1515
import requests
16+
from dotenv import load_dotenv
1617
from prime_sandboxes import (
1718
APIClient,
1819
BackgroundJob,
1920
CreateSandboxRequest,
2021
SandboxClient,
2122
)
2223

23-
from rlm.constants.repl import APT_PACKAGES, PIP_PACKAGES
2424
from rlm.core.comms_utils import LMRequest, send_lm_request, send_lm_request_batched
2525
from rlm.core.types import REPLResult, RLMChatCompletion
2626
from rlm.environments.base_env import IsolatedEnv
27+
from rlm.environments.constants import APT_PACKAGES, PIP_PACKAGES
28+
29+
load_dotenv()
2730

2831
# =============================================================================
2932
# Broker Server Script (runs inside sandbox, handles LLM request queue)
@@ -280,12 +283,11 @@ def __init__(
280283
context_payload: dict | list | str | None = None,
281284
setup_code: str | None = None,
282285
network_access: bool = True,
283-
api_key: str | None = None,
284286
persistent: bool = False,
285287
**kwargs: Any,
286288
):
287289
super().__init__(persistent=persistent, **kwargs)
288-
290+
289291
if persistent:
290292
raise NotImplementedError(
291293
"Persistent REPLs are currently not supported for environment: PrimeREPL"

0 commit comments

Comments
 (0)