repo_id stringclasses 409
values | prefix large_stringlengths 34 36.3k | target large_stringlengths 1 498 | assertion_type stringclasses 31
values | difficulty stringclasses 8
values | test_file stringlengths 10 121 | test_function stringlengths 1 104 | test_class stringlengths 0 51 | lineno int32 2 11.3k | commit_idx int32 |
|---|---|---|---|---|---|---|---|---|---|
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, gcd, igcd, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_gcd_negative():
assert_equal("\\gcd(-12, 4)", gcd(-12, 4))
assert_equal("\\gcd(219, -9)", gcd(219, ... | gcd(-5, -5)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/gcd_test.py | test_gcd_negative | 38 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol
epsilon_upper = Symbol('char"000190', real=True)
epsilon_lower = Symbol('epsilon', real=True)
varepsilon = Symbol('varepsilon', real=True)
def test_greek_varepsilon():
assert_equal('\\varepsilon', | varepsilon) | assert_* | variable | examples/simplelr_math_eval/latex2sympy/tests/greek_test.py | test_greek_varepsilon | 19 | null | |
hkust-nlp/simpleRL-reason | import numpy as np
class DigitCompletion(object):
def __init__(self, max_number: int, max_diff: int, max_num_in_response: int, seed=0):
"""
Args:
max_number: the maximum number allowed in the arithmetic sequence
max_diff: the maximum diff. The actual common diff will be sa... | state | assert | variable | tests/e2e/envs/digit_completion/task.py | set_state | DigitCompletion | 65 | null |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Min, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_min_symbol():
assert_equal("\\min(x)", Min(x), symbolically=True)
assert_equal("\\min(x, y)", Min(x... | Min(y, x)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/min_test.py | test_min_symbol | 64 | null | |
hkust-nlp/simpleRL-reason | import os
import torch
import transformers
from verl.third_party.vllm import LLM, vllm_version
from verl.utils.model import update_model_config
from vllm import SamplingParams
from transformers import AutoTokenizer, AutoConfig, AutoModelForCausalLM
from transformers import GenerationConfig
from verl.utils.torch_func... | 2 | assert | numeric_literal | tests/rollout/test_vllm_hf_loader.py | test_vllm_with_hf | 73 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Max, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_max_multiarg():
assert_equal("\\max(1,2)", Max(1, 2))
assert_equal("\\max(9,876,543)", Max(9, 876, ... | Max(x, y, z)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/max_test.py | test_max_multiarg | 75 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Min, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_min_float():
assert_equal("\\min(\\pi, 3)", Min(pi, 3))
assert_equal("\\min(1234.56789, 1234.567890... | Min(6, 6.2)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/min_test.py | test_min_float | 34 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Min, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_min_usual():
assert_equal("\\min(1, 5)", Min(1, 5))
assert_equal("\\min(12, 4)", Min(12, 4))
as... | Min(0, 0)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/min_test.py | test_min_usual | 15 | null | |
hkust-nlp/simpleRL-reason | import random
import pytest
import torch
from tensordict import TensorDict
from verl.protocol import union_tensor_dict, union_numpy_dict
from verl import DataProto
import numpy as np
def test_pop():
obs = torch.randn(100, 10)
act = torch.randn(100, 3)
dataset = DataProto.from_dict({'obs': obs, 'act': act... | {'obs'} | assert | collection | tests/utility/test_tensor_dict_utilities.py | test_pop | 140 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, lcm, ilcm, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_lcm_expr():
assert_equal("\\lcm(1+1, 8)", | lcm(1 + 1, 8)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/lcm_test.py | test_lcm_expr | 97 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Min, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_min_expr():
assert_equal("\\min((1+6)/3, 7)", Min(Rational(1 + 6, 3), 7))
assert_equal("\\min(58*9... | Min(58 * 9)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/min_test.py | test_min_expr | 53 | null | |
hkust-nlp/simpleRL-reason | import ray
from verl.single_controller.base import Worker
from verl.single_controller.base.decorator import register, Dispatch
from verl.single_controller.ray.base import RayResourcePool, RayClassWithInitArgs, RayWorkerGroup, create_colocated_worker_cls
from verl import DataProto
def test_colocated_workers():
ra... | critic_output.batch) | assert_* | complex_expr | tests/ray/test_colocated_workers.py | test_colocated_workers | 78 | null | |
hkust-nlp/simpleRL-reason | import torch
import copy
import torch.distributed
from torch.distributed import init_device_mesh
from verl.utils.distributed import initialize_global_process_group
from verl.utils.model import create_random_mask, compute_position_id_with_mask
from verl.utils.torch_functional import masked_mean, log_probs_from_logits_al... | mean_full) | assert_* | variable | tests/model/test_transformers_ulysses.py | test_hf_casual_fwd | 124 | null | |
hkust-nlp/simpleRL-reason | import random
import pytest
import torch
from tensordict import TensorDict
from verl.protocol import union_tensor_dict, union_numpy_dict
from verl import DataProto
import numpy as np
def test_chunk_concat():
obs = torch.tensor([1, 2, 3, 4, 5, 6])
labels = ['a', 'b', 'c', 'd', 'e', 'f']
data = DataProto.f... | 2 | assert | numeric_literal | tests/utility/test_tensor_dict_utilities.py | test_chunk_concat | 119 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Integer, Pow
symbols = [
('letter', 'x', 'x'),
('greek letter', '\\lambda', 'lambda'),
('greek letter w/ space', '\\alpha ', 'alpha'),
('accented letter', '\\overline{x}', 'xbar')
]
subscripts = [
('2'),
('{23}'),
('... | Symbol(symbol_text + '_' + subscript, real=True)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/atom_expr_test.py | test_with_subexpr | 36 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Max, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_max_expr():
assert_equal("\\max((1+6)/3, 7)", Max(Rational(1 + 6, 3), 7))
assert_equal("\\max(58*9... | Max(58 * 9)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/max_test.py | test_max_expr | 53 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import exp, sin, Symbol, E
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_exp_func():
assert_equal("\\exp(3)", | exp(3)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/exp_test.py | test_exp_func | 15 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
import hashlib
from sympy import UnevaluatedExpr, Symbol, Mul, Pow, Max, Min, gcd, lcm, floor, ceiling
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_variable_letter():
assert_equal("\\variable{x}", | Symbol('x' + hashlib.md5('x'.encode()).hexdigest(), real=True)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/variable_test.py | test_variable_letter | 11 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import exp, sin, Symbol, E
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_exp_command_symbol_multiplied():
'''
\\exponentialE is NOT a function, so using the following notation equates to multiplication
'''
assert_equal("\\exp... | E * 3) | assert_* | complex_expr | examples/simplelr_math_eval/latex2sympy/tests/exp_test.py | test_exp_command_symbol_multiplied | 35 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
import hashlib
from sympy import UnevaluatedExpr, Symbol, Mul, Pow, Max, Min, gcd, lcm, floor, ceiling
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_variable_single_arg_func():
assert_equal("\\floor(\\variable{x})", floor(Symbol('x' + hashlib.md5('x... | ceiling(Symbol('x' + hashlib.md5('x'.encode()).hexdigest(), real=True))) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/variable_test.py | test_variable_single_arg_func | 85 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Max, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_max_float():
assert_equal("\\max(\\pi, 3)", | Max(pi, 3)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/max_test.py | test_max_float | 31 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Max, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_max_negative():
assert_equal("\\max(-9, 4)", | Max(-9, 4)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/max_test.py | test_max_negative | 22 | null | |
hkust-nlp/simpleRL-reason | import time
from typing import Dict, List, Any, Tuple
import ray
from ray.util import list_named_actors
from ray.util.placement_group import placement_group, PlacementGroup
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy, NodeAffinitySchedulingStrategy
from ray.experimental.state.api import... | pg.bundle_count | assert | complex_expr | verl/single_controller/ray/base.py | _init_with_resource_pool | RayWorkerGroup | 229 | null |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Max, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_max_usual():
assert_equal("\\max(1, 5)", | Max(1, 5)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/max_test.py | test_max_usual | 11 | null | |
hkust-nlp/simpleRL-reason | import time
from typing import Dict, List, Any, Tuple
import ray
from ray.util import list_named_actors
from ray.util.placement_group import placement_group, PlacementGroup
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy, NodeAffinitySchedulingStrategy
from ray.experimental.state.api import... | rp2.max_collocate_count | assert | complex_expr | verl/single_controller/ray/base.py | merge_resource_pool | 116 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, gcd, igcd, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_gcd_negative():
assert_equal("\\gcd(-12, 4)", | gcd(-12, 4)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/gcd_test.py | test_gcd_negative | 35 | null | |
hkust-nlp/simpleRL-reason | import torch
import gc
from transformers import LlamaModel, LlamaConfig
from verl.utils.memory_buffer import MemoryBufferModuleWrapper
def test_memory_buffers():
llama_config = LlamaConfig(vocab_size=256,
hidden_size=4096,
intermediate_size=11008,
... | name2 | assert | variable | tests/gpu_utility/test_memory_buffers.py | test_memory_buffers | 65 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal, _Pow, _Add, _Mul
import pytest
from sympy import Integral, sin, Symbol, Mul, Integer, Pow
from latex2sympy.latex2sympy2 import latex2sympy as process_sympy
a = Symbol('a', real=True)
b = Symbol('b', real=True)
x = Symbol('x', real=True)
theta = Symbol('theta', real=True)
func_arg_ex... | output) | assert_* | variable | examples/simplelr_math_eval/latex2sympy/tests/grouping_test.py | test_func_arg_groupings | 34 | null | |
hkust-nlp/simpleRL-reason | import torch
import ray
from verl.single_controller.ray.base import RayResourcePool, RayClassWithInitArgs, RayWorkerGroup
from verl.single_controller.base.worker import Worker
from verl.single_controller.base.decorator import register, Dispatch, collect_all_to_all, Execute
def two_to_all_dispatch_fn(worker_group, *ar... | [8, 10, 12, 14] | assert | collection | tests/ray/test_worker_group_basics.py | test_basics | 117 | null | |
hkust-nlp/simpleRL-reason | import time
from typing import Dict, List, Any, Tuple
import ray
from ray.util import list_named_actors
from ray.util.placement_group import placement_group, PlacementGroup
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy, NodeAffinitySchedulingStrategy
from ray.experimental.state.api import... | init_args_dict.keys() | assert | func_call | verl/single_controller/ray/base.py | create_colocated_worker_cls | 437 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_fraction():
assert_equal("1/2\\mod 3", Mod(Rational(1, 2), 3))
assert_equal("6/2\\m... | Mod(Rational(6, 2), 3)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_fraction | 36 | null | |
hkust-nlp/simpleRL-reason | import random
import pytest
import torch
from tensordict import TensorDict
from verl.protocol import union_tensor_dict, union_numpy_dict
from verl import DataProto
import numpy as np
def test_pop():
obs = torch.randn(100, 10)
act = torch.randn(100, 3)
dataset = DataProto.from_dict({'obs': obs, 'act': act... | {'2'} | assert | collection | tests/utility/test_tensor_dict_utilities.py | test_pop | 141 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Max, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_max_multiarg():
assert_equal("\\max(1,2)", | Max(1, 2)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/max_test.py | test_max_multiarg | 73 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_symbol():
assert_equal("x\\mod y", Mod(x, y))
assert_equal("2x\\mod y", | Mod(2 * x, y)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_symbol | 67 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
import hashlib
from sympy import UnevaluatedExpr, Symbol, Mul, Pow, Max, Min, gcd, lcm, floor, ceiling
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_variable_after_subscript_required():
with pytest.raises(Exception):
assert_equal("\\variabl... | Symbol('x_' + hashlib.md5('x_'.encode()).hexdigest(), real=True)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/variable_test.py | test_variable_after_subscript_required | 32 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, gcd, igcd, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_gcd_usual():
assert_equal("\\gcd(18, 3)", gcd(18, 3))
assert_equal("\\gcd(3, 18)", gcd(3, 18))
... | gcd(2, 2)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/gcd_test.py | test_gcd_usual | 13 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, lcm, ilcm, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_lcm_usual():
assert_equal("\\lcm(6, 4)", lcm(6, 4))
assert_equal("\\lcm(4, 6)", lcm(4, 6))
ass... | lcm(2, 2)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/lcm_test.py | test_lcm_usual | 13 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_usual():
assert_equal("128\\mod 3", Mod(128, 3))
assert_equal("7\\mod 128", Mod(7, 1... | Mod(3, 2)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_usual | 15 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, lcm, ilcm, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_lcm_negative():
assert_equal("\\lcm(-12, 4)", | lcm(-12, 4)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/lcm_test.py | test_lcm_negative | 37 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_negative():
assert_equal("-1\\mod 2", Mod(-1, 2))
assert_equal("-3\\mod 3", | Mod(-3, 3)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_negative | 25 | null | |
hkust-nlp/simpleRL-reason | import random
import pytest
import torch
from tensordict import TensorDict
from verl.protocol import union_tensor_dict, union_numpy_dict
from verl import DataProto
import numpy as np
def test_chunk_concat():
obs = torch.tensor([1, 2, 3, 4, 5, 6])
labels = ['a', 'b', 'c', 'd', 'e', 'f']
data = DataProto.f... | data.meta_info | assert | complex_expr | tests/utility/test_tensor_dict_utilities.py | test_chunk_concat | 131 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
import hashlib
from sympy import UnevaluatedExpr, Symbol, Mul, Pow, Max, Min, gcd, lcm, floor, ceiling
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_variable_single_arg_func():
assert_equal("\\floor(\\variable{x})", | floor(Symbol('x' + hashlib.md5('x'.encode()).hexdigest(), real=True))) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/variable_test.py | test_variable_single_arg_func | 84 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal, get_simple_examples
import pytest
from sympy import floor
examples = get_simple_examples(floor)
@pytest.mark.parametrize('input, output, symbolically', examples)
def test_floor_func(input, output, symbolically):
assert_equal("\\floor({input})".format(input=input), | output) | assert_* | variable | examples/simplelr_math_eval/latex2sympy/tests/floor_test.py | test_floor_func | 10 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_negative():
assert_equal("-1\\mod 2", | Mod(-1, 2)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_negative | 24 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal, _Mul, _Pow
import pytest
from sympy import pi, Symbol, acos, cos
def test_pi_frac():
assert_equal("\\frac{\\pi}{3}", | _Mul(pi, _Pow(3, -1))) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/pi_test.py | test_pi_frac | 7 | null | |
hkust-nlp/simpleRL-reason | import os
import tempfile
import shutil
import torch
import copy
import torch.distributed
from torch.distributed import init_device_mesh
from verl.utils.distributed import initialize_global_process_group
from verl.utils.checkpoint.fsdp_checkpoint_manager import FSDPCheckpointManager
from transformers import AutoModelFo... | 2 | assert | numeric_literal | tests/checkpoint/test_fsdp_ckpt.py | test_fsdp_ckpt | 31 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, gcd, igcd, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_gcd_float():
assert_equal("\\gcd(2.4, 3.6)", gcd(Rational('2.4'), Rational('3.6')))
assert_equal("\... | gcd(pi, 3)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/gcd_test.py | test_gcd_float | 55 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, lcm, ilcm, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_lcm_negative():
assert_equal("\\lcm(-12, 4)", lcm(-12, 4))
assert_equal("\\lcm(219, -9)", lcm(219, ... | lcm(-5, -5)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/lcm_test.py | test_lcm_negative | 40 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Max, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_max_usual():
assert_equal("\\max(1, 5)", Max(1, 5))
assert_equal("\\max(12, 4)", Max(12, 4))
as... | Max(3, 3)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/max_test.py | test_max_usual | 14 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Min, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_min_multiarg():
assert_equal("\\min(1,2)", | Min(1, 2)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/min_test.py | test_min_multiarg | 73 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Min, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_min_multiarg():
assert_equal("\\min(1,2)", Min(1, 2))
assert_equal("\\min(9,876,543)", Min(9, 876, ... | Min(x, y, z)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/min_test.py | test_min_multiarg | 75 | null | |
hkust-nlp/simpleRL-reason | from verl.utils.model import create_random_mask
from flash_attn.bert_padding import unpad_input
import torch
import pytest
def test_lr_scheduler():
from torch import nn
model = nn.Linear(10, 10)
optimizer = torch.optim.Adam(model.parameters(), lr=1e-3)
from verl.utils.torch_functional import get_const... | [0.0, 0.0005, 0.001, 0.001, 0.001]) | assert_* | collection | tests/gpu_utility/test_torch_functional.py | test_lr_scheduler | 86 | null | |
hkust-nlp/simpleRL-reason | import torch
import gc
from transformers import LlamaModel, LlamaConfig
from verl.utils.memory_buffer import MemoryBufferModuleWrapper
def test_memory_buffers():
llama_config = LlamaConfig(vocab_size=256,
hidden_size=4096,
intermediate_size=11008,
... | 0.01 | assert | numeric_literal | tests/gpu_utility/test_memory_buffers.py | test_memory_buffers | 62 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol
epsilon_upper = Symbol('char"000190', real=True)
epsilon_lower = Symbol('epsilon', real=True)
varepsilon = Symbol('varepsilon', real=True)
def test_greek_epsilon():
assert_equal("\\epsilon", | epsilon_lower) | assert_* | variable | examples/simplelr_math_eval/latex2sympy/tests/greek_test.py | test_greek_epsilon | 11 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_usual():
assert_equal("128\\mod 3", | Mod(128, 3)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_usual | 11 | null | |
hkust-nlp/simpleRL-reason | import torch
import torch.distributed
from tensordict import TensorDict
from verl.trainer.fsdp_sft_trainer import FSDPSFTTrainer
from torch.distributed.device_mesh import init_device_mesh
from verl.utils.distributed import initialize_global_process_group
def test_trainer_forward_consistency(trainer: FSDPSFTTrainer, to... | 1e-2 | assert | numeric_literal | tests/sft/test_sp_loss_match.py | test_trainer_forward_consistency | 75 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_float():
assert_equal("0.41\\mod 2", Mod(Rational('0.41'), 2))
assert_equal("143E-13... | Mod(987, pi)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_float | 51 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_fraction():
assert_equal("1/2\\mod 3", | Mod(Rational(1, 2), 3)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_fraction | 35 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Sum, I, Symbol, Integer
a = Symbol('a', real=True)
b = Symbol('b', real=True)
i = Symbol('i', real=True)
n = Symbol('n', real=True)
x = Symbol('x', real=True)
def test_complex_sum():
assert_equal("\\sum_{i=0}^{n} i \\cdot x", | Sum(i * x, (i, 0, n))) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/complex_test.py | test_complex_sum | 21 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
import hashlib
from sympy import UnevaluatedExpr, Symbol, Mul, Pow, Max, Min, gcd, lcm, floor, ceiling
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_variable_letter_subscript():
assert_equal("\\variable{x_y}", | Symbol('x_y' + hashlib.md5('x_y'.encode()).hexdigest(), real=True)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/variable_test.py | test_variable_letter_subscript | 19 | null | |
hkust-nlp/simpleRL-reason | import numpy as np
class DigitCompletion(object):
def __init__(self, max_number: int, max_diff: int, max_num_in_response: int, seed=0):
"""
Args:
max_number: the maximum number allowed in the arithmetic sequence
max_diff: the maximum diff. The actual common diff will be sa... | 0 | assert | numeric_literal | tests/e2e/envs/digit_completion/task.py | __init__ | DigitCompletion | 48 | null |
hkust-nlp/simpleRL-reason | def test_flash_attn_cross_entropy():
from verl.utils.torch_functional import logprobs_from_logits_naive
from verl.utils.debug import log_gpu_memory_usage
from flash_attn.ops.triton.cross_entropy import cross_entropy_loss
import torch
from torch import nn
log_gpu_memory_usage('At start')
... | groundtruth) | assert_* | variable | tests/gpu_utility/test_ops.py | test_flash_attn_cross_entropy | 47 | null | |
hkust-nlp/simpleRL-reason | import time
from typing import Dict, List, Any, Tuple
import ray
from ray.util import list_named_actors
from ray.util.placement_group import placement_group, PlacementGroup
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy, NodeAffinitySchedulingStrategy
from ray.experimental.state.api import... | rp2.n_gpus_per_node | assert | complex_expr | verl/single_controller/ray/base.py | merge_resource_pool | 117 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, lcm, ilcm, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_lcm_negative():
assert_equal("\\lcm(-12, 4)", lcm(-12, 4))
assert_equal("\\lcm(219, -9)", | lcm(219, -9)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/lcm_test.py | test_lcm_negative | 38 | null | |
hkust-nlp/simpleRL-reason | from sympy import simplify, srepr, Add, Mul, Pow, Rational, pi, sqrt, Symbol
from latex2sympy.latex2sympy2 import latex2sympy as process_sympy
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def _Add(a, b):
... | expected_exp_tree | assert | variable | examples/simplelr_math_eval/latex2sympy/tests/context.py | compare | 72 | null | |
hkust-nlp/simpleRL-reason | import time
from typing import Dict, List, Any, Tuple
import ray
from ray.util import list_named_actors
from ray.util.placement_group import placement_group, PlacementGroup
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy, NodeAffinitySchedulingStrategy
from ray.experimental.state.api import... | sorted_src_pgs[searching_idx].bundle_count | assert | complex_expr | verl/single_controller/ray/base.py | extract_pg_from_exist | 106 | null | |
hkust-nlp/simpleRL-reason | import time
from typing import Dict, List, Any, Tuple
import ray
from ray.util import list_named_actors
from ray.util.placement_group import placement_group, PlacementGroup
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy, NodeAffinitySchedulingStrategy
from ray.experimental.state.api import... | cls.cls.__ray_actor_class__.__base__ | assert | complex_expr | verl/single_controller/ray/base.py | create_colocated_worker_cls | 432 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Min, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_min_symbol():
assert_equal("\\min(x)", Min(x), symbolically=True)
assert_equal("\\min(x, y)", Min(x... | Min(z, y, x)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/min_test.py | test_min_symbol | 69 | null | |
hkust-nlp/simpleRL-reason | import time
import ray
from verl.single_controller.ray.base import RayResourcePool, RayClassWithInitArgs, RayWorkerGroup, merge_resource_pool
from verl.single_controller.base.worker import Worker
def test():
ray.init()
# test single-node-no-partition
print(f"test single-node-no-partition")
resource_... | [str(i) for i in range(8)] | assert | collection | tests/ray/test_high_level_scheduling_api.py | test | 51 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, lcm, ilcm, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_lcm_float():
assert_equal("\\lcm(2.4, 3.6)", lcm(Rational('2.4'), Rational('3.6')))
assert_equal("\... | lcm(pi, 3)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/lcm_test.py | test_lcm_float | 57 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_usual():
assert_equal("128\\mod 3", Mod(128, 3))
assert_equal("7\\mod 128", Mod(7, 1... | Mod(5, 5)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_usual | 14 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import exp, sin, Symbol, E
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_exp_expr():
assert_equal("\\sin(x)*e^x", | sin(x) * exp(x)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/exp_test.py | test_exp_expr | 57 | null | |
hkust-nlp/simpleRL-reason | import time
import ray
from verl.single_controller.ray.base import RayResourcePool, RayClassWithInitArgs, RayWorkerGroup, merge_resource_pool
from verl.single_controller.base.worker import Worker
def test():
ray.init()
# test single-node-no-partition
print(f"test single-node-no-partition")
resource_... | 4 | assert | numeric_literal | tests/ray/test_high_level_scheduling_api.py | test | 71 | null | |
hkust-nlp/simpleRL-reason | import os
from transformers import AutoTokenizer
from verl.utils import hf_tokenizer
from verl.utils.dataset.sft_dataset import SFTDataset
def get_gsm8k_data():
# prepare test dataset
url = "https://github.com/eric-haibin-lin/verl-data/raw/refs/heads/main/gsm8k/train.parquet"
local_folder = os.path.expand... | 1 | assert | numeric_literal | tests/verl/utils/dataset/test_sft_dataset.py | test_sft_cot_dataset | 42 | null | |
hkust-nlp/simpleRL-reason | import os
import tempfile
import shutil
import torch
import copy
import torch.distributed
from torch.distributed import init_device_mesh
from verl.utils.distributed import initialize_global_process_group
from verl.utils.checkpoint.fsdp_checkpoint_manager import FSDPCheckpointManager
from transformers import AutoModelFo... | logits_after_load) | assert_* | variable | tests/checkpoint/test_fsdp_ckpt.py | test_fsdp_ckpt | 117 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import exp, sin, Symbol, E
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_exp_letter():
assert_equal("e", E)
assert_equal("e", | exp(1)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/exp_test.py | test_exp_letter | 11 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import sin, Symbol
x = Symbol('x', real=True)
def test_left_right_cdot():
assert_equal("\\sin\\left(x\\right)\\cdot x", | sin(x) * x) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/left_right_cdot_test.py | test_left_right_cdot | 9 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, lcm, ilcm, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_lcm_symbol():
assert_equal("\\lcm(x, y)", | lcm(x, y)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/lcm_test.py | test_lcm_symbol | 111 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
import hashlib
from sympy import UnevaluatedExpr, Symbol, Mul, Pow, Max, Min, gcd, lcm, floor, ceiling
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_variable_in_expr():
assert_equal("4\\cdot\\variable{x}", | 4 * Symbol('x' + hashlib.md5('x'.encode()).hexdigest(), real=True)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/variable_test.py | test_variable_in_expr | 46 | null | |
hkust-nlp/simpleRL-reason | import os
import ray
import torch
from verl import DataProto
from tensordict import TensorDict
from verl.single_controller.base.worker import Worker
from verl.single_controller.ray.base import RayResourcePool, RayClassWithInitArgs
from verl.single_controller.ray import RayWorkerGroup
os.environ['RAY_DEDUP_LOGS'] = '0... | ret_proto2.batch["decode_count"]) | assert_* | complex_expr | tests/ray/test_driverfunc_to_worker.py | test | 79 | null | |
hkust-nlp/simpleRL-reason | import os
from transformers import AutoTokenizer
from verl.utils import hf_tokenizer
from verl.utils.dataset.rm_dataset import RMDataset
def get_rm_data():
# prepare test dataset
url = "https://github.com/eric-haibin-lin/verl-data/raw/refs/heads/main/full_hh_rlhf/rm/test.parquet"
local_folder = os.path.ex... | str | assert | variable | tests/verl/utils/dataset/test_rm_dataset.py | test_rm_dataset | 37 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal, _Add, _Mul, _Pow
import pytest
from sympy import binomial, Symbol
x = Symbol('x', real=True)
y = Symbol('y', real=True)
theta = Symbol('theta', real=True)
gamma = Symbol('gamma', real=True)
def test_binomial_expr():
assert_equal("\\binom{16+2}{\\frac{4}{2}}", | binomial(_Add(16, 2), _Mul(4, _Pow(2, -1)), evaluate=False)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/binomial_test.py | test_binomial_expr | 24 | null | |
hkust-nlp/simpleRL-reason | import time
from typing import Dict, List, Any, Tuple
import ray
from ray.util import list_named_actors
from ray.util.placement_group import placement_group, PlacementGroup
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy, NodeAffinitySchedulingStrategy
from ray.experimental.state.api import... | rp2.detached | assert | complex_expr | verl/single_controller/ray/base.py | merge_resource_pool | 118 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal, get_simple_examples
import pytest
from sympy import Abs
examples = get_simple_examples(Abs)
delimiter_pairs = {
'|': '|',
'\\vert': '\\vert',
'\\lvert': '\\rvert'
}
@pytest.mark.parametrize('input, output, symbolically', examples)
def test_abs(input, output, symbolicall... | output) | assert_* | variable | examples/simplelr_math_eval/latex2sympy/tests/abs_test.py | test_abs | 17 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, gcd, igcd, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_gcd_symbol():
assert_equal("\\gcd(x, y)", | gcd(x, y)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/gcd_test.py | test_gcd_symbol | 109 | null | |
hkust-nlp/simpleRL-reason | import torch
import ray
from verl.single_controller.ray.base import RayResourcePool, RayClassWithInitArgs, RayWorkerGroup
from verl.single_controller.base.worker import Worker
from verl.single_controller.base.decorator import register, Dispatch, collect_all_to_all, Execute
def two_to_all_dispatch_fn(worker_group, *ar... | 5 | assert | numeric_literal | tests/ray/test_worker_group_basics.py | remote_call_wg | 78 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Max, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_max_float():
assert_equal("\\max(\\pi, 3)", Max(pi, 3))
assert_equal("\\max(1234.56789, 1234.567890... | Max(-98.7)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/max_test.py | test_max_float | 35 | null | |
hkust-nlp/simpleRL-reason | import os
import ray
from verl.single_controller.ray.base import RayResourcePool, RayClassWithInitArgs, RayWorkerGroup
from verl.single_controller.base.worker import Worker
from verl.single_controller.base.decorator import register, Dispatch, collect_all_to_all, Execute
def test_basics():
ray.init()
# create... | ["4", "4", "4", "4"] | assert | collection | tests/ray/test_ray_local_envs.py | test_basics | 48 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, lcm, ilcm, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_lcm_symbol():
assert_equal("\\lcm(x, y)", lcm(x, y), symbolically=True)
assert_equal("\\lcm(y, -x)"... | lcm(y, y)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/lcm_test.py | test_lcm_symbol | 116 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, UnevaluatedExpr, lcm, ilcm, sqrt, pi
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_lcm_usual():
assert_equal("\\lcm(6, 4)", | lcm(6, 4)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/lcm_test.py | test_lcm_usual | 11 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Min, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_min_symbol():
assert_equal("\\min(x)", | Min(x)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/min_test.py | test_min_symbol | 62 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal, _Add, _Mul, _Pow
import pytest
from sympy import binomial, Symbol
x = Symbol('x', real=True)
y = Symbol('y', real=True)
theta = Symbol('theta', real=True)
gamma = Symbol('gamma', real=True)
def test_binomial_greek_symbols():
assert_equal("\\binom{\\theta}{\\gamma}", | binomial(theta, gamma)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/binomial_test.py | test_binomial_greek_symbols | 20 | null | |
hkust-nlp/simpleRL-reason | import time
import ray
from verl.single_controller.ray.base import RayResourcePool, RayClassWithInitArgs, RayWorkerGroup, merge_resource_pool
from verl.single_controller.base.worker import Worker
def test():
ray.init()
# test single-node-no-partition
print(f"test single-node-no-partition")
resource_... | 8 | assert | numeric_literal | tests/ray/test_high_level_scheduling_api.py | test | 73 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal, process_sympy
import pytest
def pytest_generate_tests(metafunc):
metafunc.parametrize('s', metafunc.cls.BAD_STRINGS)
class TestAllBad(object):
BAD_STRINGS = [
"(",
")",
# "a / b /",
"\\frac{d}{dx}",
"(\\frac{d}{dx})"
"\\sqrt{}... | Exception) | pytest.raises | variable | examples/simplelr_math_eval/latex2sympy/tests/all_bad_test.py | test_bad_string | TestAllBad | 69 | null |
hkust-nlp/simpleRL-reason | import random
import pytest
import torch
from tensordict import TensorDict
from verl.protocol import union_tensor_dict, union_numpy_dict
from verl import DataProto
import numpy as np
def test_dataproto_pad_unpad():
obs = torch.tensor([[1, 2], [3, 4], [5, 6]])
labels = ['a', 'b', 'c']
data = DataProto.fro... | 1 | assert | numeric_literal | tests/utility/test_tensor_dict_utilities.py | test_dataproto_pad_unpad | 180 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Mod, sqrt, nsimplify, pi, GoldenRatio
from sympy.physics.units import hbar
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_mod_negative():
assert_equal("-1\\mod 2", Mod(-1, 2))
assert_equal("-3\\mod 3", Mod(-3, ... | Mod(-12, -12)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/mod_test.py | test_mod_negative | 26 | null | |
hkust-nlp/simpleRL-reason | import time
from typing import Dict, List, Any, Tuple
import ray
from ray.util import list_named_actors
from ray.util.placement_group import placement_group, PlacementGroup
from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy, NodeAffinitySchedulingStrategy
from ray.experimental.state.api import... | None | assert | none_literal | verl/single_controller/ray/base.py | _init_with_resource_pool | RayWorkerGroup | 274 | null |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import exp, sin, Symbol, E
x = Symbol('x', real=True)
y = Symbol('y', real=True)
def test_exp_symbol_expr():
assert_equal("e^{x+y}", | exp(x + y)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/exp_test.py | test_exp_symbol_expr | 49 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Min, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_min_negative():
assert_equal("\\min(-9, 4)", Min(-9, 4))
assert_equal("\\min(4, -9)", | Min(4, -9)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/min_test.py | test_min_negative | 23 | null | |
hkust-nlp/simpleRL-reason | from .context import assert_equal
import pytest
from sympy import Symbol, Rational, Float, Max, sqrt, exp, pi, nsimplify
x = Symbol('x', real=True)
y = Symbol('y', real=True)
z = Symbol('z', real=True)
def test_max_usual():
assert_equal("\\max(1, 5)", Max(1, 5))
assert_equal("\\max(12, 4)", | Max(12, 4)) | assert_* | func_call | examples/simplelr_math_eval/latex2sympy/tests/max_test.py | test_max_usual | 12 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.