Skip to content

Commit fde2c53

Browse files
Lawhyclaude
andcommitted
refactor(envs): rename SimpleMathEnv to CalculatorEnv
- Rename simple_math_env/ directory to calculator/ - Rename SimpleMathEnv class to CalculatorEnv - Update environments/__init__.py exports Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent f018a22 commit fde2c53

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

examples/aime_eval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import click
3434
from common import ModelConfig, SamplingParams
3535

36-
from strands_env.environments.simple_math_env import SimpleMathEnv
36+
from strands_env.environments.calculator.env import CalculatorEnv
3737
from strands_env.eval import AIMEEvaluator
3838
from strands_env.rewards.math_reward import MathRewardFunction
3939

@@ -49,7 +49,7 @@ async def run_eval(
4949
reward_fn = MathRewardFunction()
5050

5151
async def env_factory(_):
52-
env = SimpleMathEnv(model_factory=model_factory, reward_fn=reward_fn, verbose=False)
52+
env = CalculatorEnv(model_factory=model_factory, reward_fn=reward_fn, verbose=False)
5353
env.system_prompt = None
5454
env.get_tools = lambda: []
5555
return env

examples/math_env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from common import ModelConfig, SamplingParams
3232

3333
from strands_env.core.types import Action, TaskContext
34-
from strands_env.environments.simple_math_env import SimpleMathEnv
34+
from strands_env.environments.calculator.env import CalculatorEnv
3535
from strands_env.rewards.math_reward import MathRewardFunction
3636

3737
MATH_PROBLEMS = [
@@ -43,7 +43,7 @@
4343

4444
async def run_math_env(config: ModelConfig, verbose: bool) -> None:
4545
model_factory = config.create_factory()
46-
env = SimpleMathEnv(model_factory=model_factory, reward_fn=MathRewardFunction(), verbose=verbose)
46+
env = CalculatorEnv(model_factory=model_factory, reward_fn=MathRewardFunction(), verbose=verbose)
4747

4848
for question, ground_truth in MATH_PROBLEMS:
4949
click.echo(f"\n{'=' * 60}")

src/strands_env/environments/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
"""Environments for strands-env."""
1616

17-
from .simple_math_env import SimpleMathEnv
17+
from .calculator import CalculatorEnv
1818

19-
__all__ = ["SimpleMathEnv"]
19+
__all__ = ["CalculatorEnv"]

src/strands_env/environments/simple_math_env/__init__.py renamed to src/strands_env/environments/calculator/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
"""Simple math environment with a calculator tool."""
1616

17-
from .env import SimpleMathEnv
17+
from .env import CalculatorEnv
1818

19-
__all__ = ["SimpleMathEnv"]
19+
__all__ = ["CalculatorEnv"]

src/strands_env/environments/simple_math_env/env.py renamed to src/strands_env/environments/calculator/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from strands_env.core.environment import Environment
2222

2323

24-
class SimpleMathEnv(Environment):
24+
class CalculatorEnv(Environment):
2525
"""Simple math environment using a calculator tool."""
2626

2727
default_system_prompt_path = Path(__file__).parent / "system_prompt.md"

src/strands_env/environments/simple_math_env/system_prompt.md renamed to src/strands_env/environments/calculator/system_prompt.md

File renamed without changes.

0 commit comments

Comments
 (0)