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
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_react_based_llm_planner_rag_format
assert
numeric_literal
122
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
0
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_planner_demo_multiproc
assert
numeric_literal
128
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
4
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_react_based_llm_planner_rag_format
assert
numeric_literal
110
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
63
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_oracle_planner_teleport
assert
numeric_literal
138
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
1.0
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_planner_demo_multiproc
assert
collection
130
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
[2, 2]
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_llm_planner
assert
variable
109
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
gt_prompt
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_oracle_planner
assert
string_literal
131
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
"table_47"
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_react_based_llm_planner_rag_format
pytest.approx
complex_expr
121
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
scores[0])
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_thoughtless_llm_planner
assert_*
variable
133
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
end_token)
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_oracle_planner_teleport
assert
variable
135
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
gt_responses
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_react_based_llm_planner_rag_format
assert
variable
130
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
result_prompt
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_planner.py
test_zero_shot_react_planner
assert
complex_expr
101
import copy import gc import os from typing import Dict from unittest.mock import Mock import pytest from hydra import compose, initialize from hydra.core.hydra_config import HydraConfig from hydra.utils import instantiate from omegaconf import open_dict from torch import multiprocessing as mp from habitat_llm.agent....
planner0.curr_prompt
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_skills.py
test_object_state_skills
assert
numeric_literal
361
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
2
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_skills.py
test_object_state_skills
assert
numeric_literal
376
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
5
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_skills.py
test_floors
assert
numeric_literal
299
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
1
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_skills.py
execute_skill
assert
numeric_literal
176
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
0
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_skills.py
test_object_state_skills
assert
none_literal
274
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
None
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_skills.py
test_floors
assert
variable
317
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
counter_name
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_skills.py
execute_skill
assert
variable
167
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
max_skill_steps
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_skills.py
check_skills_execution
assert
collection
197
import sys from habitat_llm.agent.env.dataset import CollaborationDatasetV0 sys.path.append("..") import re import habitat.sims.habitat_simulator.sim_utilities as sutils import magnum as mn import numpy as np import pytest from habitat.sims.habitat_simulator.object_state_machine import set_state_of_obj from hydra i...
{ 0: "Successful execution!" }
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_empty_world_graph
assert
numeric_literal
38
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
0
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_count_nodes_of_type
assert
numeric_literal
46
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
2
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_count_nodes_of_type
assert
numeric_literal
47
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
1
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_neighbors_of_classtype
assert
collection
57
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
[]
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_find_object_furniture_pairs
assert
collection
64
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
{}
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_node_with_property
assert
variable
53
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
obj
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_subgraph
assert
string_literal
54
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
"on"
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_subgraph
assert
string_literal
55
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
"in"
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_node_with_property
assert
variable
52
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
room
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_node_with_property
assert
none_literal
56
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
None
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_subgraph
assert
string_literal
51
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
"has"
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_neighbors_of_classtype
assert
collection
51
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
[fur]
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_neighbors_of_classtype
assert
collection
52
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
[obj]
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_neighbors_of_classtype
assert
collection
53
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
[rec]
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_get_neighbors_of_classtype
assert
collection
54
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
[room]
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/partnr-planner
e13f82a2fb361c1067b80a280496440c7498e9da
0
train
train
habitat_llm/tests/test_world_graph.py
test_adding_edges_to_world_graph
assert
string_literal
49
from typing import Tuple import pytest from habitat_llm.world_model import ( Furniture, House, Human, Object, Receptacle, Room, SpotRobot, ) from habitat_llm.world_model.world_graph import WorldGraph def util_add_nodes(graph) -> Tuple[WorldGraph, list]: # add a room to the graph r...
"edge2"
e13f82a2fb361c1067b80a280496440c7498e9da
0
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/common.py
check_copy_var
assert
string_literal
76
import copy import torch import theseus as th BATCH_SIZES_TO_TEST = (1, 10) def create_mock_cost_functions(tensor=None, cost_weight=NullCostWeight()): len_data = 1 if tensor is None else tensor.shape[1] var1 = MockVar(len_data, tensor=tensor, name="var1") var2 = MockVar(len_data, tensor=tensor, name="va...
"new"
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/common.py
check_copy_var
assert
variable
73
import copy import torch import theseus as th BATCH_SIZES_TO_TEST = (1, 10) def create_mock_cost_functions(tensor=None, cost_weight=NullCostWeight()): len_data = 1 if tensor is None else tensor.shape[1] var1 = MockVar(len_data, tensor=tensor, name="var1") var2 = MockVar(len_data, tensor=tensor, name="va...
new_var
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/common.py
check_another_theseus_function_is_copy
assert
variable
90
import copy import torch import theseus as th BATCH_SIZES_TO_TEST = (1, 10) def create_mock_cost_functions(tensor=None, cost_weight=NullCostWeight()): len_data = 1 if tensor is None else tensor.shape[1] var1 = MockVar(len_data, tensor=tensor, name="var1") var2 = MockVar(len_data, tensor=tensor, name="va...
other_fn
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/common.py
check_another_theseus_function_is_copy
assert
variable
91
import copy import torch import theseus as th BATCH_SIZES_TO_TEST = (1, 10) def create_mock_cost_functions(tensor=None, cost_weight=NullCostWeight()): len_data = 1 if tensor is None else tensor.shape[1] var1 = MockVar(len_data, tensor=tensor, name="var1") var2 = MockVar(len_data, tensor=tensor, name="va...
new_name
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/common.py
check_another_theseus_tensor_is_copy
assert
variable
82
import copy import torch import theseus as th BATCH_SIZES_TO_TEST = (1, 10) def create_mock_cost_functions(tensor=None, cost_weight=NullCostWeight()): len_data = 1 if tensor is None else tensor.shape[1] var1 = MockVar(len_data, tensor=tensor, name="var1") var2 = MockVar(len_data, tensor=tensor, name="va...
other_var
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/common.py
check_another_torch_tensor_is_copy
assert
variable
86
import copy import torch import theseus as th BATCH_SIZES_TO_TEST = (1, 10) def create_mock_cost_functions(tensor=None, cost_weight=NullCostWeight()): len_data = 1 if tensor is None else tensor.shape[1] var1 = MockVar(len_data, tensor=tensor, name="var1") var2 = MockVar(len_data, tensor=tensor, name="va...
other_tensor
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/common.py
check_copy_var
assert
complex_expr
74
import copy import torch import theseus as th BATCH_SIZES_TO_TEST = (1, 10) def create_mock_cost_functions(tensor=None, cost_weight=NullCostWeight()): len_data = 1 if tensor is None else tensor.shape[1] var1 = MockVar(len_data, tensor=tensor, name="var1") var2 = MockVar(len_data, tensor=tensor, name="va...
new_var.tensor
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/common.py
check_copy_var
assert
string_literal
78
import copy import torch import theseus as th BATCH_SIZES_TO_TEST = (1, 10) def create_mock_cost_functions(tensor=None, cost_weight=NullCostWeight()): len_data = 1 if tensor is None else tensor.shape[1] var1 = MockVar(len_data, tensor=tensor, name="var1") var2 = MockVar(len_data, tensor=tensor, name="va...
f"{var.name}_copy"
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_cost_function.py
error_fn
assert
numeric_literal
21
import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th from theseus.core.cost_function import AutogradMode from theseus.core.cost_weight import ScaleCostWeight from .common import ( MockCostFunction, MockCostWeight, MockVar, check_another_theseus_function_is_copy...
0
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_cost_function.py
test_default_name_and_ids
assert
variable
28
import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th from theseus.core.cost_function import AutogradMode from theseus.core.cost_weight import ScaleCostWeight from .common import ( MockCostFunction, MockCostWeight, MockVar, check_another_theseus_function_is_copy...
reps
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_cost_function.py
error_fn
assert
variable
22
import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th from theseus.core.cost_function import AutogradMode from theseus.core.cost_weight import ScaleCostWeight from .common import ( MockCostFunction, MockCostWeight, MockVar, check_another_theseus_function_is_copy...
num_vars
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_cost_function.py
test_autodiff_cost_function_cost_weight
assert
variable
72
import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th from theseus.core.cost_function import AutogradMode from theseus.core.cost_weight import ScaleCostWeight from .common import ( MockCostFunction, MockCostWeight, MockVar, check_another_theseus_function_is_copy...
cost_weight
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_cost_function.py
test_autodiff_cost_function_error_and_jacobians_shape
pytest.raises
variable
80
import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th from theseus.core.cost_function import AutogradMode from theseus.core.cost_weight import ScaleCostWeight from .common import ( MockCostFunction, MockCostWeight, MockVar, check_another_theseus_function_is_copy...
ValueError)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_cost_function.py
test_autodiff_cost_function_error_and_jacobians_shape
assert
variable
106
import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th from theseus.core.cost_function import AutogradMode from theseus.core.cost_weight import ScaleCostWeight from .common import ( MockCostFunction, MockCostWeight, MockVar, check_another_theseus_function_is_copy...
num_optim_vars
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_cost_function.py
test_default_name_and_ids
assert
variable
27
import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th from theseus.core.cost_function import AutogradMode from theseus.core.cost_weight import ScaleCostWeight from .common import ( MockCostFunction, MockCostWeight, MockVar, check_another_theseus_function_is_copy...
cost_function_name
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_cost_function.py
test_autodiff_cost_function_error_and_jacobians_shape_on_SO3
assert
collection
81
import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th from theseus.core.cost_function import AutogradMode from theseus.core.cost_weight import ScaleCostWeight from .common import ( MockCostFunction, MockCostWeight, MockVar, check_another_theseus_function_is_copy...
(batch_size, err_dim, 3)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_cost_function.py
test_autodiff_cost_function_error_and_jacobians_shape
assert
collection
109
import copy import numpy as np import pytest # noqa: F401 import torch import theseus as th from theseus.core.cost_function import AutogradMode from theseus.core.cost_weight import ScaleCostWeight from .common import ( MockCostFunction, MockCostWeight, MockVar, check_another_theseus_function_is_copy...
(batch_size, err_dim, i + 1)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_manifold.py
test_variable_no_args_init
assert
string_literal
12
import pytest # noqa: F401 import torch import theseus as th from .common import MockVar, check_copy_var def test_variable_no_args_init(): var = MockVarNoArgs(name="mock") assert var.tensor.allclose(torch.ones(1, 1)) assert var.name ==
"mock"
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_manifold.py
test_var_shape
assert
complex_expr
13
import pytest # noqa: F401 import torch import theseus as th from .common import MockVar, check_copy_var def test_var_shape(): for sz in range(100): data = torch.ones(1, sz) var = MockVar(sz, tensor=data) assert data.shape ==
var.shape
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_manifold.py
test_update_shape_check
pytest.raises
variable
13
import pytest # noqa: F401 import torch import theseus as th from .common import MockVar, check_copy_var def test_update_shape_check(): for sz in range(2, 100): data = torch.ones(sz) var = MockVar(sz) with pytest.raises(
ValueError)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
test_copy_no_duplicate_cost_weights
assert
numeric_literal
46
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def test_copy_no...
1
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
test_getters
assert
none_literal
35
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def test_getters...
None
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
test_copy_no_duplicate_cost_weights
assert
variable
43
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def test_copy_no...
scale
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
test_to_dtype
assert
variable
24
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def test_to_dtyp...
dtype
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
_check_variables
assert
variable
26
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def _check_v...
v1_data
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
_check_variables
assert
variable
27
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def _check_v...
v2_data
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
test_copy
assert
variable
23
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def test_copy():...
objective
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
test_update_raises_batch_size_error
assert
variable
40
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def test_update_...
batch_size
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
test_update_updates_properly
assert
complex_expr
44
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def test_update_...
var_.tensor
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_objective.py
test_update_raises_batch_size_error
pytest.raises
variable
49
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import ( MockCostFunction, MockCostWeight, MockVar, NullCostWeight, check_another_theseus_tensor_is_copy, create_mock_cost_functions, create_objective_with_mock_cost_functions, ) def test_update_...
ValueError)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_robust_cost.py
test_mask_jacobians
assert_*
variable
40
import pytest import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST def _new_robust_cf( batch_size, loss_cls, generator, masked_weight=False ) -> th.RobustCostFunction: v1 = th.rand_se3(batch_size, generator=generator) v2 = th.rand_se3(batch_size, generator=generator) if...
j2)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_robust_cost.py
test_mask_jacobians
assert_*
variable
38
import pytest import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST def _new_robust_cf( batch_size, loss_cls, generator, masked_weight=False ) -> th.RobustCostFunction: v1 = th.rand_se3(batch_size, generator=generator) v2 = th.rand_se3(batch_size, generator=generator) if...
err_expected)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_robust_cost.py
test_robust_cost_grad_form
assert_*
variable
47
import pytest import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST def _new_robust_cf( batch_size, loss_cls, generator, masked_weight=False ) -> th.RobustCostFunction: v1 = th.rand_se3(batch_size, generator=generator) v2 = th.rand_se3(batch_size, generator=generator) if...
expected_grad)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_robust_cost.py
test_robust_cost_weighted_error
assert_*
variable
45
import pytest import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST def _new_robust_cf( batch_size, loss_cls, generator, masked_weight=False ) -> th.RobustCostFunction: v1 = th.rand_se3(batch_size, generator=generator) v2 = th.rand_se3(batch_size, generator=generator) if...
expected_rho2)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_theseus_function.py
test_theseus_function_init
assert
func_call
26
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockCostFunction, MockCostWeight def test_theseus_function_init(): all_ids = [] variables = [th.Variable(torch.ones(1, 1), name="var_1")] aux_vars = [th.Variable(torch.ones(1, 1), name="aux_1")] for i...
len(all_ids)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_theseus_function.py
test_no_copy_vars_check
pytest.raises
variable
17
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockCostFunction, MockCostWeight def test_no_copy_vars_check(): variables = [th.Variable(torch.ones(1, 1), name="var_1")] aux_vars = [th.Variable(torch.ones(1, 1), name="aux_1")] cost_weight = MockCostWei...
RuntimeError)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_theseus_function.py
test_theseus_function_init
assert
complex_expr
24
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockCostFunction, MockCostWeight def test_theseus_function_init(): all_ids = [] variables = [th.Variable(torch.ones(1, 1), name="var_1")] aux_vars = [th.Variable(torch.ones(1, 1), name="aux_1")] for i...
cost_function.name
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_variable.py
test_properties
assert
variable
19
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockVar def test_properties(): for i in range(100): length = np.random.randint(2, 5) batch_size = np.random.randint(1, 100) dtype = torch.float if np.random.random() < 0.5 else torch.long ...
dtype
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_variable.py
test_variable_init
assert
complex_expr
21
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockVar def test_variable_init(): all_ids = [] for i in range(100): if np.random.random() < 0.5: name = f"name_{i}" else: name = None data = torch.rand(1, 1) ...
t.name
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_variable.py
test_properties
assert
complex_expr
18
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockVar def test_properties(): for i in range(100): length = np.random.randint(2, 5) batch_size = np.random.randint(1, 100) dtype = torch.float if np.random.random() < 0.5 else torch.long ...
data.ndim
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_variable.py
test_properties
assert
complex_expr
17
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockVar def test_properties(): for i in range(100): length = np.random.randint(2, 5) batch_size = np.random.randint(1, 100) dtype = torch.float if np.random.random() < 0.5 else torch.long ...
data.shape
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_variable.py
test_update
pytest.raises
variable
25
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockVar def test_update(): for _ in range(10): for length in range(1, 10): var = MockVar(length) batch_size = np.random.randint(1, 10) # check update from torch tensor ...
ValueError)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_variable.py
test_variable_init
assert
func_call
26
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockVar def test_variable_init(): all_ids = [] for i in range(100): if np.random.random() < 0.5: name = f"name_{i}" else: name = None data = torch.rand(1, 1) ...
len(all_ids)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_variable.py
test_update
assert
variable
18
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockVar def test_update(): for _ in range(10): for length in range(1, 10): var = MockVar(length) batch_size = np.random.randint(1, 10) # check update from torch tensor ...
new_data_good
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_variable.py
test_variable_init
assert
string_literal
23
import numpy as np import pytest # noqa: F401 import torch import theseus as th from .common import MockVar def test_variable_init(): all_ids = [] for i in range(100): if np.random.random() < 0.5: name = f"name_{i}" else: name = None data = torch.rand(1, 1) ...
f"Variable__{t._id}"
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_correct_schemas_and_shared_vars
assert
numeric_literal
57
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def test_correct_schemas_and_shared_vars(): v1 = th.Vector(1) v2 = th.Vector(1) tv = th.Vec...
5
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_correct_schemas_and_shared_vars
assert
numeric_literal
63
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def test_correct_schemas_and_shared_vars(): v1 = th.Vector(1) v2 = th.Vector(1) tv = th.Vec...
2
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_correct_schemas_and_shared_vars
assert
numeric_literal
70
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def test_correct_schemas_and_shared_vars(): v1 = th.Vector(1) v2 = th.Vector(1) tv = th.Vec...
1
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_correct_schemas_for_autodiffcosts
assert
collection
59
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def test_correct_schemas_for_autodiffcosts(): v1_1 = th.Vector(1) v1_2 = th.Vector(1) v1_3 ...
[1] * 4
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_correct_schemas_for_autodiffcosts
assert
variable
49
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def test_correct_schemas_for_autodiffcosts(): v1_1 = th.Vector(1) v1_2 = th.Vector(1) v1_3 ...
cost_fns
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_costs_vars_and_err_before_vectorization
assert
variable
54
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def test_costs_vars_and_err_before_vectorization(): for _ in range(20): objective = th.Obje...
aux_vars
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
_check_vectorized_wrappers
assert_*
variable
19
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def _check_vectorized_wrappers(vectorization, objective): for w in vectorization._cost_fn_wrappers:...
exp_jac)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_costs_vars_and_err_before_vectorization
assert
variable
58
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def test_costs_vars_and_err_before_vectorization(): for _ in range(20): objective = th.Obje...
optim_vars
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_masked_jacobians
assert_*
complex_expr
83
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def _check_vectorized_wrappers(vectorization, objective): for w in vectorization._cost_fn_wrappers:...
sol2[f"x{i}"])
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_vectorized_error
assert_*
func_call
63
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def _check_vectorized_wrappers(vectorization, objective): for w in vectorization._cost_fn_wrappers:...
objective.error())
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/core/test_vectorizer.py
test_vectorized_error
assert
complex_expr
57
from unittest import mock import numpy as np import pytest # noqa: F401 import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from theseus.core.vectorizer import _CostFunctionWrapper def _check_vectorized_wrappers(vectorization, objective): for w in vectorization._cost_fn_wrappers:...
vectorization._cost_fn_wrappers
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/embodied/collision/test_collision_factor.py
test_collision2d_copy
assert
string_literal
48
import pytest # noqa import torch import theseus as th from tests.core.common import ( BATCH_SIZES_TO_TEST, check_another_theseus_function_is_copy, check_another_theseus_tensor_is_copy, check_another_torch_tensor_is_copy, ) from theseus.utils import numeric_jacobian from .utils import random_origin, ...
"new_name"
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/embodied/collision/test_collision_factor.py
test_collision2d_copy
assert
variable
33
import pytest # noqa import torch import theseus as th from tests.core.common import ( BATCH_SIZES_TO_TEST, check_another_theseus_function_is_copy, check_another_theseus_tensor_is_copy, check_another_torch_tensor_is_copy, ) from theseus.utils import numeric_jacobian from .utils import random_origin, ...
cost_function2
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/embodied/collision/test_collision_factor.py
test_collision2d_error_shapes
assert
complex_expr
36
import pytest # noqa import torch import theseus as th from tests.core.common import ( BATCH_SIZES_TO_TEST, check_another_theseus_function_is_copy, check_another_theseus_tensor_is_copy, check_another_torch_tensor_is_copy, ) from theseus.utils import numeric_jacobian from .utils import random_origin, ...
jac_error.shape
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/embodied/collision/test_collision_factor.py
test_collision2d_error_shapes
assert
collection
37
import pytest # noqa import torch import theseus as th from tests.core.common import ( BATCH_SIZES_TO_TEST, check_another_theseus_function_is_copy, check_another_theseus_tensor_is_copy, check_another_torch_tensor_is_copy, ) from theseus.utils import numeric_jacobian from .utils import random_origin, ...
(batch_size, 1)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/embodied/collision/test_collision_factor.py
test_collision2d_error_shapes
assert
collection
38
import pytest # noqa import torch import theseus as th from tests.core.common import ( BATCH_SIZES_TO_TEST, check_another_theseus_function_is_copy, check_another_theseus_tensor_is_copy, check_another_torch_tensor_is_copy, ) from theseus.utils import numeric_jacobian from .utils import random_origin, ...
(batch_size, 1, 2)
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/embodied/collision/test_eff_obj_contact.py
test_eff_obj_variable_type
assert
numeric_literal
84
import numpy as np import pytest # noqa import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from tests.embodied.collision.utils import ( random_origin, random_scalar, random_sdf_data, ) from tests.geometry.test_se2 import create_random_se2 from theseus.utils import numeric_...
2
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/embodied/collision/test_eff_obj_contact.py
_check_jacobian
assert
numeric_literal
19
import numpy as np import pytest # noqa import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from tests.embodied.collision.utils import ( random_origin, random_scalar, random_sdf_data, ) from tests.geometry.test_se2 import create_random_se2 from theseus.utils import numeric_...
1e-5
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor
facebookresearch/theseus
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
train
train
tests/embodied/collision/test_eff_obj_contact.py
test_eff_obj_variable_type
assert
variable
70
import numpy as np import pytest # noqa import torch import theseus as th from tests.core.common import BATCH_SIZES_TO_TEST from tests.embodied.collision.utils import ( random_origin, random_scalar, random_sdf_data, ) from tests.geometry.test_se2 import create_random_se2 from theseus.utils import numeric_...
eff_radius
f2509ce58e301464b4b090c10fb4b118e83d2db0
126
v2_extractor_at_anchor