repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_save_load.py
test_set_env
assert
none_literal
64
import base64 import io import json import os import pathlib import warnings import zipfile from collections import OrderedDict from copy import deepcopy import gymnasium as gym import numpy as np import pytest import torch as th from stable_baselines3 import A2C, DDPG, DQN, PPO, SAC, TD3 from stable_baselines3.commo...
None
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_save_load.py
test_open_file
assert
variable
64
import base64 import io import json import os import pathlib import warnings import zipfile from collections import OrderedDict from copy import deepcopy import gymnasium as gym import numpy as np import pytest import torch as th from stable_baselines3 import A2C, DDPG, DQN, PPO, SAC, TD3 from stable_baselines3.commo...
buff
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_sde.py
test_state_dependent_noise
assert
numeric_literal
42
import gymnasium as gym import numpy as np import pytest import torch as th from torch.distributions import Normal from stable_baselines3 import A2C, PPO, SAC @pytest.mark.parametrize("model_class", [SAC, A2C, PPO]) @pytest.mark.parametrize("use_expln", [False, True]) @pytest.mark.parametrize("squash_output", [False,...
1.0
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_sde.py
test_state_dependent_noise
assert
numeric_literal
44
import gymnasium as gym import numpy as np import pytest import torch as th from torch.distributions import Normal from stable_baselines3 import A2C, PPO, SAC @pytest.mark.parametrize("model_class", [SAC, A2C, PPO]) @pytest.mark.parametrize("use_expln", [False, True]) @pytest.mark.parametrize("squash_output", [False,...
-1.0
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_sde.py
test_sde_check
pytest.raises
variable
11
import gymnasium as gym import numpy as np import pytest import torch as th from torch.distributions import Normal from stable_baselines3 import A2C, PPO, SAC def test_sde_check(): with pytest.raises(
ValueError)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_sde.py
test_only_sde_squashed
pytest.raises
complex_expr
11
import gymnasium as gym import numpy as np import pytest import torch as th from torch.distributions import Normal from stable_baselines3 import A2C, PPO, SAC def test_only_sde_squashed(): with pytest.raises(
AssertionError, match="use_sde=True")
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_spaces.py
test_action_spaces
pytest.raises
variable
38
from dataclasses import dataclass from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from gymnasium.spaces.space import Space from stable_baselines3 import A2C, DDPG, DQN, PPO, SAC, TD3 from stable_baselines3.common.env_checker import check_env from...
AssertionError)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_spaces.py
test_float64_action_space
assert
complex_expr
53
from dataclasses import dataclass from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from gymnasium.spaces.space import Space from stable_baselines3 import A2C, DDPG, DQN, PPO, SAC, TD3 from stable_baselines3.common.env_checker import check_env from...
env.action_space.dtype
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_tensorboard.py
test_escape_log_name
assert
numeric_literal
28
import os from typing import Dict, Union import pytest from stable_baselines3 import A2C, PPO, SAC, TD3 from stable_baselines3.common.callbacks import BaseCallback from stable_baselines3.common.logger import HParam from stable_baselines3.common.utils import get_latest_run_id MODEL_DICT = { "a2c": (A2C, "CartPole...
2
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_train_eval_mode.py
test_predict_with_dropout_batch_norm
assert_*
variable
131
from typing import Union import gymnasium as gym import numpy as np import pytest import torch as th import torch.nn as nn from stable_baselines3 import A2C, DQN, PPO, SAC, TD3 from stable_baselines3.common.preprocessing import get_flattened_obs_dim from stable_baselines3.common.torch_layers import BaseFeaturesExtrac...
prediction)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_vec_env_wrapper_kwargs
assert
numeric_literal
30
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
3
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_custom_vec_env
assert
numeric_literal
42
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
1
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_get_parameters_by_name
assert
numeric_literal
35
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
6
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_get_parameters_by_name
assert
numeric_literal
39
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
2
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_make_atari_env
assert
numeric_literal
75
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
1.0
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_evaluate_policy_monitors
assert
numeric_literal
71
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
0.0
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_vec_env_kwargs
assert
numeric_literal
30
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
0.11
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_vec_env_monitor_kwargs
assert
bool_literal
36
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
True
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_evaluate_policy
assert
none_literal
40
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
None
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_vec_env_monitor_kwargs
assert
bool_literal
30
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
False
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
test_make_vec_env
assert
variable
35
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
n_envs
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_utils.py
dummy_callback
assert
variable
30
import os import shutil import gymnasium as gym import numpy as np import pytest import torch as th from gymnasium import spaces import stable_baselines3 as sb3 from stable_baselines3 import A2C from stable_baselines3.common.atari_wrappers import MaxAndSkipEnv from stable_baselines3.common.env_util import is_wrapped,...
locals_
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_check_nan.py
test_check_nan
pytest.raises
variable
17
import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.vec_env import DummyVecEnv, VecCheckNan def test_check_nan(): """Test VecCheckNan Object""" env = DummyVecEnv([NanAndInfEnv]) env = VecCheckNan(env, raise_exception=True) env.step([[0]...
ValueError)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_vecenv_custom_calls
assert
numeric_literal
76
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
2
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_render
assert
numeric_literal
96
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
0
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_vecenv_wrapper_getattr
assert
string_literal
53
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
"a"
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_vecenv_wrapper_getattr
assert
string_literal
54
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
"b"
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_vecenv_custom_calls
assert
none_literal
81
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
None
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_vecenv_custom_calls
assert
collection
100
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
[12]
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_vecenv_wrapper_getattr
assert
string_literal
55
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
"bb"
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_vecenv_terminal_obs
assert
variable
48
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
info
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
check_vecenv_obs
assert
variable
43
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
N_ENVS
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_render
assert
string_literal
108
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
"rgb_array"
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_vecenv_func_checker
pytest.raises
variable
27
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
ValueError)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_envs.py
test_vec_env_is_wrapped
assert
collection
58
import collections import functools import itertools import multiprocessing import os import warnings from typing import Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.monitor...
[False, True]
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_extract_dict_obs.py
test_extract_dict_obs
assert
collection
21
import numpy as np from gymnasium import spaces from stable_baselines3 import PPO from stable_baselines3.common.vec_env import VecEnv, VecExtractDictObs, VecMonitor def test_extract_dict_obs(): """Test VecExtractDictObs""" env = DictObsVecEnv() env = VecExtractDictObs(env, "rgb") assert env.reset().s...
(86, 86)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_extract_dict_obs.py
test_extract_dict_obs
assert
collection
13
import numpy as np from gymnasium import spaces from stable_baselines3 import PPO from stable_baselines3.common.vec_env import VecEnv, VecExtractDictObs, VecMonitor def test_extract_dict_obs(): """Test VecExtractDictObs""" env = DictObsVecEnv() env = VecExtractDictObs(env, "rgb") assert env.reset()....
(4, 86, 86)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor_load_results
assert
numeric_literal
29
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
1
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor_load_results
assert
numeric_literal
48
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
2
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor_ppo
assert
numeric_literal
31
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
0
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor_info_keywords
assert
numeric_literal
43
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
4
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor_load_results
assert
variable
30
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
monitor_files
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor
assert
collection
47
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
{"l", "t", "r"}
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor_info_keywords
assert
collection
44
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
["False", "True"]
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor_info_keywords
assert
complex_expr
33
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
infos[0]["episode"]
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor
assert
collection
44
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
{"t_start", "env_id"}
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor
assert
complex_expr
34
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
infos[0]["episode"]["r"]
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_monitor.py
test_vec_monitor
assert
complex_expr
35
import csv import json import os import uuid import warnings import gymnasium as gym import pandas import pytest from stable_baselines3 import PPO from stable_baselines3.common.envs.bit_flipping_env import BitFlippingEnv from stable_baselines3.common.evaluation import evaluate_policy from stable_baselines3.common.mon...
infos[0]["episode"]["l"]
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_her_normalization
assert
variable
117
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
env
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_sync_vec_normalize
assert
none_literal
102
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
None
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_get_original
assert_*
variable
113
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
obs)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_her_normalization
assert
variable
119
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
eval_env
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_vec_env
assert
variable
114
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
clip_obs
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_get_original
assert_*
variable
114
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
rewards)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_get_original
assert
complex_expr
109
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
obs.shape
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
check_vec_norm_equal
assert
complex_expr
70
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
normb.gamma
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_vec_env
assert
variable
115
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
clip_reward
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
check_vec_norm_equal
assert
complex_expr
71
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
normb.epsilon
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_normalize_external
assert
complex_expr
103
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
rewards.shape
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_combining_stats
assert
func_call
124
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
id(rms_3.var)
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
test_get_original
assert
complex_expr
110
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
rewards.dtype
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
check_vec_norm_equal
assert
complex_expr
60
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
normb.num_envs
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_normalize.py
check_vec_norm_equal
assert
complex_expr
64
import operator from typing import Any, Dict, Optional import gymnasium as gym import numpy as np import pytest from gymnasium import spaces from stable_baselines3 import SAC, TD3, HerReplayBuffer from stable_baselines3.common.envs import FakeImageEnv from stable_baselines3.common.monitor import Monitor from stable_b...
normb.clip_obs
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_stacked_obs.py
test_compute_stacking_multidim_box_channel_first
assert
numeric_literal
18
import numpy as np from gymnasium import spaces from stable_baselines3.common.vec_env.stacked_observations import StackedObservations compute_stacking = StackedObservations.compute_stacking NUM_ENVS = 2 N_STACK = 4 H, W, C = 16, 24, 3 def test_compute_stacking_multidim_box_channel_first(): space = spaces.Box(-1,...
1
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_stacked_obs.py
test_compute_stacking_multidim_box_channel_first
assert
numeric_literal
20
import numpy as np from gymnasium import spaces from stable_baselines3.common.vec_env.stacked_observations import StackedObservations compute_stacking = StackedObservations.compute_stacking NUM_ENVS = 2 N_STACK = 4 H, W, C = 16, 24, 3 def test_compute_stacking_multidim_box_channel_first(): space = spaces.Box(-1,...
0
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_stacked_obs.py
test_compute_stacking_box
assert
numeric_literal
16
import numpy as np from gymnasium import spaces from stable_baselines3.common.vec_env.stacked_observations import StackedObservations compute_stacking = StackedObservations.compute_stacking NUM_ENVS = 2 N_STACK = 4 H, W, C = 16, 24, 3 def test_compute_stacking_box(): space = spaces.Box(-1, 1, (4,)) channels_...
-1
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DLR-RM/stable-baselines3
16c6a886db529bdff2a1d084126f60888c132695
175
train
train
tests/test_vec_stacked_obs.py
test_reset_update_box
assert
complex_expr
18
import numpy as np from gymnasium import spaces from stable_baselines3.common.vec_env.stacked_observations import StackedObservations compute_stacking = StackedObservations.compute_stacking NUM_ENVS = 2 N_STACK = 4 H, W, C = 16, 24, 3 def test_reset_update_box(): space = spaces.Box(-1, 1, (4,)) stacked_obser...
space.dtype
16c6a886db529bdff2a1d084126f60888c132695
175
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_bug_fixes.py
test_bug1_wildcard_import_fixed
self.assertNotIn
variable
21
import ast import json import tempfile import unittest from z3 import Const, IntSort from z3dsl.dsl.expressions import ExpressionParser from z3dsl.dsl.sorts import SortManager from z3dsl.interpreter import Z3JSONInterpreter from z3dsl.security.validator import ExpressionValidator class TestBugFixes(unittest.TestCase...
content)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_bug_fixes.py
test_bug5_security_sandbox_ast_based
self.assertRaises
variable
21
import ast import json import tempfile import unittest from z3 import Const, IntSort from z3dsl.dsl.expressions import ExpressionParser from z3dsl.dsl.sorts import SortManager from z3dsl.interpreter import Z3JSONInterpreter from z3dsl.security.validator import ExpressionValidator class TestBugFixes(unittest.TestCase...
ValueError)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_bug_fixes.py
test_bug8_constants_dict_semantics_fixed
self.assertEqual
string_literal
24
import ast import json import tempfile import unittest from z3 import Const, IntSort from z3dsl.dsl.expressions import ExpressionParser from z3dsl.dsl.sorts import SortManager from z3dsl.interpreter import Z3JSONInterpreter from z3dsl.security.validator import ExpressionValidator class TestBugFixes(unittest.TestCase...
"my_const")
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_bug_fixes.py
test_bug5_security_sandbox_ast_based
self.assertIn
func_call
23
import ast import json import tempfile import unittest from z3 import Const, IntSort from z3dsl.dsl.expressions import ExpressionParser from z3dsl.dsl.sorts import SortManager from z3dsl.interpreter import Z3JSONInterpreter from z3dsl.security.validator import ExpressionValidator class TestBugFixes(unittest.TestCase...
str(ctx.exception))
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_bug_fixes.py
test_bug3_context_cache_timing_fixed
self.assertIsNone
complex_expr
20
import ast import json import tempfile import unittest from z3 import Const, IntSort from z3dsl.dsl.expressions import ExpressionParser from z3dsl.dsl.sorts import SortManager from z3dsl.interpreter import Z3JSONInterpreter from z3dsl.security.validator import ExpressionValidator class TestBugFixes(unittest.TestCase...
parser._context_cache)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_missing_sections_get_defaults
self.assertEqual
collection
21
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_missing_sections_get_defaults(self) -> None: """Test that missing sections get appropriate defaults.""" with tempfile.NamedTemporaryFile(m...
[])
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_invalid_constants_section_structure
self.assertEqual
collection
21
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_invalid_constants_section_structure(self) -> None: """Test that invalid constants structure is corrected.""" with tempfile.NamedTemporaryF...
{})
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_custom_timeouts
self.assertEqual
numeric_literal
16
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_custom_timeouts(self) -> None: """Test that custom timeouts are respected.""" interpreter = Z3JSONInterpreter( "tests/fixtures...
5000)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_custom_timeouts
self.assertEqual
numeric_literal
17
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_custom_timeouts(self) -> None: """Test that custom timeouts are respected.""" interpreter = Z3JSONInterpreter( "tests/fixtures...
20000)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_verify_conditions_action
self.assertIn
variable
29
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_verify_conditions_action(self) -> None: """Test that verify_conditions action works.""" config = { "constants": {"nums": {"sor...
output)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_load_nonexistent_file
self.assertRaises
variable
13
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_load_nonexistent_file(self) -> None: """Test that loading nonexistent file raises FileNotFoundError.""" with self.assertRaises(
FileNotFoundError)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_missing_sections_get_defaults
self.assertIn
complex_expr
19
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_missing_sections_get_defaults(self) -> None: """Test that missing sections get appropriate defaults.""" with tempfile.NamedTemporaryFile(m...
interpreter.config)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_load_invalid_json
self.assertRaises
complex_expr
18
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_load_invalid_json(self) -> None: """Test that loading invalid JSON raises JSONDecodeError.""" with tempfile.NamedTemporaryFile(mode="w", s...
json.JSONDecodeError)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_invalid_constants_section_structure
self.assertTrue
func_call
20
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_invalid_constants_section_structure(self) -> None: """Test that invalid constants structure is corrected.""" with tempfile.NamedTemporaryF...
any("dictionary" in msg for msg in cm.output))
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/integration/test_interpreter.py
test_unknown_action_logs_warning
self.assertTrue
func_call
21
import json import os import tempfile import unittest from z3dsl.interpreter import Z3JSONInterpreter class TestZ3JSONInterpreter(unittest.TestCase): def test_unknown_action_logs_warning(self) -> None: """Test that unknown action logs warning.""" with tempfile.NamedTemporaryFile(mode="w", suffix=...
any("Unknown action" in msg for msg in cm.output))
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_expression_parser.py
test_parse_simple_arithmetic
self.assertIsNotNone
variable
22
import unittest from typing import Any from z3 import BoolSort, Const, Function, IntSort from z3dsl.dsl.expressions import ExpressionParser class TestExpressionParser(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.functions: dict[str, Any] = {} self.constan...
result)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_expression_parser.py
test_build_context_without_symbols_loaded
self.assertIn
variable
21
import unittest from typing import Any from z3 import BoolSort, Const, Function, IntSort from z3dsl.dsl.expressions import ExpressionParser class TestExpressionParser(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.functions: dict[str, Any] = {} self.constan...
context)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_expression_parser.py
test_build_context_with_symbols_loaded
self.assertIn
variable
25
import unittest from typing import Any from z3 import BoolSort, Const, Function, IntSort from z3dsl.dsl.expressions import ExpressionParser class TestExpressionParser(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.functions: dict[str, Any] = {} self.constan...
context1)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_expression_parser.py
test_build_context_with_symbols_loaded
self.assertIn
variable
26
import unittest from typing import Any from z3 import BoolSort, Const, Function, IntSort from z3dsl.dsl.expressions import ExpressionParser class TestExpressionParser(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.functions: dict[str, Any] = {} self.constan...
context2)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_expression_parser.py
test_quantified_var_shadows_constant_warning
self.assertEqual
variable
25
import unittest from typing import Any from z3 import BoolSort, Const, Function, IntSort from z3dsl.dsl.expressions import ExpressionParser class TestExpressionParser(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.functions: dict[str, Any] = {} self.constan...
shadow_var)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_expression_parser.py
test_parse_expression_with_invalid_syntax
self.assertRaises
variable
21
import unittest from typing import Any from z3 import BoolSort, Const, Function, IntSort from z3dsl.dsl.expressions import ExpressionParser class TestExpressionParser(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.functions: dict[str, Any] = {} self.constan...
ValueError)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_expression_parser.py
test_parse_expression_with_invalid_syntax
self.assertIn
func_call
23
import unittest from typing import Any from z3 import BoolSort, Const, Function, IntSort from z3dsl.dsl.expressions import ExpressionParser class TestExpressionParser(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.functions: dict[str, Any] = {} self.constan...
str(ctx.exception))
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_optimizer.py
test_optimize_invalid_constraint_syntax
self.assertRaises
variable
28
import unittest from typing import Any from z3 import Const, IntSort from z3dsl.dsl.expressions import ExpressionParser from z3dsl.optimization.optimizer import OptimizerRunner class TestOptimizerRunner(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.sorts = {"IntSo...
ValueError)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_optimizer.py
test_optimize_references_global_constants
self.assertNotIn
func_call
34
import unittest from typing import Any from z3 import Const, IntSort from z3dsl.dsl.expressions import ExpressionParser from z3dsl.optimization.optimizer import OptimizerRunner class TestOptimizerRunner(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.sorts = {"IntSo...
str(e).lower())
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_optimizer.py
test_optimize_no_config
self.assertTrue
func_call
25
import unittest from typing import Any from z3 import Const, IntSort from z3dsl.dsl.expressions import ExpressionParser from z3dsl.optimization.optimizer import OptimizerRunner class TestOptimizerRunner(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.sorts = {"IntSo...
any("No optimization section" in msg for msg in cm.output))
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_optimizer.py
test_optimize_unknown_objective_type
self.assertTrue
func_call
30
import unittest from typing import Any from z3 import Const, IntSort from z3dsl.dsl.expressions import ExpressionParser from z3dsl.optimization.optimizer import OptimizerRunner class TestOptimizerRunner(unittest.TestCase): def setUp(self) -> None: """Set up test fixtures.""" self.sorts = {"IntSo...
any("Unknown optimization type" in msg for msg in cm.output))
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_security_validator.py
test_safe_eval_evaluates_simple_expression
self.assertEqual
numeric_literal
13
import ast import unittest from z3dsl.security.validator import ExpressionValidator class TestExpressionValidator(unittest.TestCase): def test_safe_eval_evaluates_simple_expression(self) -> None: """Test that simple expressions evaluate correctly.""" expr = "2 + 3" result = ExpressionVali...
5)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_security_validator.py
test_safe_eval_uses_context
self.assertEqual
numeric_literal
14
import ast import unittest from z3dsl.security.validator import ExpressionValidator class TestExpressionValidator(unittest.TestCase): def test_safe_eval_uses_context(self) -> None: """Test that context variables are accessible.""" expr = "x + y" context = {"x": 10, "y": 20} result...
30)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_security_validator.py
test_safe_eval_allows_normal_attribute_access
self.assertEqual
numeric_literal
18
import ast import unittest from z3dsl.security.validator import ExpressionValidator class TestExpressionValidator(unittest.TestCase): def test_safe_eval_allows_normal_attribute_access(self) -> None: """Test that normal attribute access is allowed.""" class Obj: value = 42 ex...
42)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_security_validator.py
test_safe_eval_uses_safe_globals
self.assertIsNotNone
variable
17
import ast import unittest from z3dsl.security.validator import ExpressionValidator class TestExpressionValidator(unittest.TestCase): def test_safe_eval_uses_safe_globals(self) -> None: """Test that safe globals are accessible.""" from z3 import And, BoolVal expr = "And(a, b)" sa...
result)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_security_validator.py
test_check_safe_ast_blocks_dunder_attributes
self.assertRaises
variable
13
import ast import unittest from z3dsl.security.validator import ExpressionValidator class TestExpressionValidator(unittest.TestCase): def test_check_safe_ast_blocks_dunder_attributes(self) -> None: """Test that dunder attribute access is blocked.""" expr = "obj.__class__" tree = ast.parse...
ValueError)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_security_validator.py
test_check_safe_ast_blocks_import
self.assertRaises
variable
12
import ast import unittest from z3dsl.security.validator import ExpressionValidator class TestExpressionValidator(unittest.TestCase): def test_check_safe_ast_blocks_import(self) -> None: """Test that import statements are blocked.""" # This will fail to parse in eval mode, but test Import node ch...
SyntaxError)
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor
DebarghaG/proofofthought
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
train
train
tests/unit/test_security_validator.py
test_check_safe_ast_blocks_dunder_attributes
self.assertIn
func_call
15
import ast import unittest from z3dsl.security.validator import ExpressionValidator class TestExpressionValidator(unittest.TestCase): def test_check_safe_ast_blocks_dunder_attributes(self) -> None: """Test that dunder attribute access is blocked.""" expr = "obj.__class__" tree = ast.parse...
str(ctx.exception))
312e408f9eb7fe767393e34d779d6e1a0f1238b8
0
v2_extractor_at_anchor