Skip to content

Merge pull request #614 from StanfordVL/profiling #20

Merge pull request #614 from StanfordVL/profiling

Merge pull request #614 from StanfordVL/profiling #20

GitHub Actions / Test Results failed Feb 22, 2024 in 1s

69 passed, 3 failed and 16 skipped

Tests failed

❌ results.xml

88 tests were completed in 1262s with 69 passed, 3 failed and 16 skipped.

Test suite Passed Failed Skipped Time
pytest 69✅ 3❌ 16⚪ 1262s

❌ pytest

tests.test_dump_load_states
  ✅ test_dump_load
  ✅ test_dump_load_serialized
tests.test_envs
  ✅ test_dummy_task
  ✅ test_point_reaching_task
  ✅ test_point_navigation_task
  ✅ test_behavior_task
  ✅ test_rs_int_full_load
tests.test_object_removal
  ✅ test_removal_and_readdition
  ✅ test_readdition
tests.test_object_states
  ✅ test_on_top
  ✅ test_inside
  ✅ test_under
  ✅ test_touching
  ✅ test_contact_bodies
  ✅ test_next_to
  ✅ test_overlaid
  ✅ test_pose
  ✅ test_aabb
  ✅ test_adjacency
  ✅ test_temperature
  ✅ test_max_temperature
  ✅ test_heat_source_or_sink
  ✅ test_cooked
  ✅ test_burnt
  ✅ test_frozen
  ✅ test_heated
  ✅ test_on_fire
  ✅ test_toggled_on
  ✅ test_attached_to
  ✅ test_particle_source
  ✅ test_particle_sink
  ✅ test_particle_applier
  ✅ test_particle_remover
  ✅ test_saturated
  ✅ test_open
  ✅ test_folded_unfolded
  ✅ test_draped
  ✅ test_filled
  ✅ test_contains
  ✅ test_covered
  ✅ test_clear_sim
tests.test_primitives
  ⚪ test_navigate
  ⚪ test_grasp
  ⚪ test_place
  ⚪ test_open_prismatic
  ⚪ test_open_revolute
tests.test_robot_teleoperation
  ⚪ test_teleop
tests.test_symbolic_primitives.TestSymbolicPrimitives
  ⚪ test_in_hand_state
  ⚪ test_open
  ⚪ test_close
  ⚪ test_place_inside
  ⚪ test_place_ontop
  ⚪ test_toggle_on
  ⚪ test_soak_under
  ⚪ test_wipe
  ⚪ test_cut
  ✅ test_persistent_sticky_grasping
tests.test_systems
  ✅ test_system_clear
tests.test_transition_rules
  ⚪ test_dryer_rule
  ✅ test_washer_rule
  ✅ test_slicing_rule
  ✅ test_dicing_rule_cooked
  ✅ test_dicing_rule_uncooked
  ✅ test_melting_rule
  ✅ test_cooking_physical_particle_rule_failure_recipe_systems
  ✅ test_cooking_physical_particle_rule_success
  ✅ test_mixing_rule_failure_recipe_systems
  ✅ test_mixing_rule_failure_nonrecipe_systems
  ✅ test_mixing_rule_success
  ✅ test_cooking_system_rule_failure_recipe_systems
  ✅ test_cooking_system_rule_failure_nonrecipe_systems
  ✅ test_cooking_system_rule_failure_nonrecipe_objects
  ✅ test_cooking_system_rule_success
  ✅ test_cooking_object_rule_failure_wrong_container
  ✅ test_cooking_object_rule_failure_recipe_objects
  ✅ test_cooking_object_rule_failure_unary_states
  ✅ test_cooking_object_rule_failure_binary_system_states
  ✅ test_cooking_object_rule_failure_binary_object_states
  ✅ test_cooking_object_rule_failure_wrong_heat_source
  ✅ test_cooking_object_rule_success
  ✅ test_single_toggleable_machine_rule_output_system_failure_wrong_container
  ✅ test_single_toggleable_machine_rule_output_system_failure_recipe_systems
  ✅ test_single_toggleable_machine_rule_output_system_failure_recipe_objects
  ✅ test_single_toggleable_machine_rule_output_system_failure_nonrecipe_systems
  ❌ test_single_toggleable_machine_rule_output_system_failure_nonrecipe_objects
	def wrapper():
  ❌ test_single_toggleable_machine_rule_output_system_success
	def wrapper():
  ✅ test_single_toggleable_machine_rule_output_object_failure_unary_states
  ❌ test_single_toggleable_machine_rule_output_object_success
	def wrapper():

Annotations

Check failure on line 0 in results.xml

See this annotation in the file changed.

@github-actions github-actions / Test Results

pytest ► tests.test_transition_rules ► test_single_toggleable_machine_rule_output_system_failure_nonrecipe_objects

Failed test found in:
  results.xml
Error:
  def wrapper():
Raw output
def wrapper():
        assert_test_scene()
        try:
>           func()

tests/utils.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    @og_test
    def test_single_toggleable_machine_rule_output_system_failure_nonrecipe_objects():
        assert len(REGISTERED_RULES) > 0, "No rules registered!"
        blender = og.sim.scene.object_registry("name", "blender")
        ice_cream = og.sim.scene.object_registry("name", "scoop_of_ice_cream")
        bowl = og.sim.scene.object_registry("name", "bowl")
        milk = get_system("whole_milk")
        chocolate_sauce = get_system("chocolate_sauce")
        milkshake = get_system("milkshake")
        sludge = get_system("sludge")
    
        deleted_objs = [ice_cream, bowl]
        deleted_objs_cfg = [retrieve_obj_cfg(obj) for obj in deleted_objs]
    
        place_obj_on_floor_plane(blender)
        og.sim.step()
    
        milk.generate_particles(positions=np.array([[0.02, 0, 0.5]]))
        chocolate_sauce.generate_particles(positions=np.array([[0, -0.02, 0.5]]))
        ice_cream.set_position([0, 0, 0.54])
        # This fails the recipe because the bowl (nonrecipe object) is in the blender
        bowl.set_position([0, 0, 0.6])
    
        og.sim.step()
    
        assert blender.states[Contains].get_value(milk)
        assert blender.states[Contains].get_value(chocolate_sauce)
        assert ice_cream.states[Inside].get_value(blender)
        assert bowl.states[Inside].get_value(blender)
    
        assert milkshake.n_particles == 0
        assert sludge.n_particles == 0
    
        blender.states[ToggledOn].set_value(True)
        og.sim.step()
    
        # Recipe should fail: no milkshake should be created, and sludge should be created.
>       assert milkshake.n_particles == 0
E       AssertionError: assert 127 == 0
E        +  where 127 = <class 'omnigibson.utils.python_utils.Milkshake'>.n_particles

tests/test_transition_rules.py:1333: AssertionError

Check failure on line 0 in results.xml

See this annotation in the file changed.

@github-actions github-actions / Test Results

pytest ► tests.test_transition_rules ► test_single_toggleable_machine_rule_output_system_success

Failed test found in:
  results.xml
Error:
  def wrapper():
Raw output
def wrapper():
        assert_test_scene()
        try:
>           func()

tests/utils.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_transition_rules.py:1357: in test_single_toggleable_machine_rule_output_system_success
    deleted_objs_cfg = [retrieve_obj_cfg(obj) for obj in deleted_objs]
tests/test_transition_rules.py:1357: in <listcomp>
    deleted_objs_cfg = [retrieve_obj_cfg(obj) for obj in deleted_objs]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

obj = None

    def retrieve_obj_cfg(obj):
        return {
>           "name": obj.name,
            "category": obj.category,
            "model": obj.model,
            "prim_type": obj.prim_type,
            "position": obj.get_position(),
            "scale": obj.scale,
            "abilities": obj.abilities,
            "visual_only": obj.visual_only,
        }
E       AttributeError: 'NoneType' object has no attribute 'name'

tests/utils.py:33: AttributeError

Check failure on line 0 in results.xml

See this annotation in the file changed.

@github-actions github-actions / Test Results

pytest ► tests.test_transition_rules ► test_single_toggleable_machine_rule_output_object_success

Failed test found in:
  results.xml
Error:
  def wrapper():
Raw output
def wrapper():
        assert_test_scene()
        try:
>           func()

tests/utils.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    @og_test
    def test_single_toggleable_machine_rule_output_object_success():
        assert len(REGISTERED_RULES) > 0, "No rules registered!"
        electric_mixer = og.sim.scene.object_registry("name", "electric_mixer")
        raw_egg = og.sim.scene.object_registry("name", "raw_egg")
        another_raw_egg = og.sim.scene.object_registry("name", "another_raw_egg")
        flour = get_system("flour")
        granulated_sugar = get_system("granulated_sugar")
        vanilla = get_system("vanilla")
        melted_butter = get_system("melted__butter")
        baking_powder = get_system("baking_powder")
        salt = get_system("salt")
        sludge = get_system("sludge")
    
        initial_doughs = og.sim.scene.object_registry("category", "sugar_cookie_dough", set()).copy()
    
        deleted_objs = [raw_egg, another_raw_egg]
        deleted_objs_cfg = [retrieve_obj_cfg(obj) for obj in deleted_objs]
    
        place_obj_on_floor_plane(electric_mixer)
        og.sim.step()
    
        another_raw_egg.set_position_orientation([-0.01, -0.14, 0.40], [0, 0, 0, 1])
        raw_egg.set_position_orientation([-0.01, -0.14, 0.37], [0, 0, 0, 1])
        flour.generate_particles(positions=np.array([[-0.01, -0.15, 0.33]]))
        granulated_sugar.generate_particles(positions=np.array([[0.01, -0.15, 0.33]]))
        vanilla.generate_particles(positions=np.array([[0.03, -0.15, 0.33]]))
        melted_butter.generate_particles(positions=np.array([[-0.01, -0.13, 0.33]]))
        baking_powder.generate_particles(positions=np.array([[0.01, -0.13, 0.33]]))
        salt.generate_particles(positions=np.array([[0.03, -0.13, 0.33]]))
    
        og.sim.step()
    
        assert electric_mixer.states[Contains].get_value(flour)
        assert electric_mixer.states[Contains].get_value(granulated_sugar)
        assert electric_mixer.states[Contains].get_value(vanilla)
        assert electric_mixer.states[Contains].get_value(melted_butter)
        assert electric_mixer.states[Contains].get_value(baking_powder)
        assert electric_mixer.states[Contains].get_value(salt)
        assert raw_egg.states[Inside].get_value(electric_mixer)
        assert not raw_egg.states[Cooked].get_value()
        assert another_raw_egg.states[Inside].get_value(electric_mixer)
        assert not another_raw_egg.states[Cooked].get_value()
    
        assert sludge.n_particles == 0
    
        electric_mixer.states[ToggledOn].set_value(True)
        og.sim.step()
    
        # Recipe should execute successfully: new dough should be created, and the ingredients should be deleted
        final_doughs = og.sim.scene.object_registry("category", "sugar_cookie_dough", set()).copy()
    
        # Recipe should execute successfully: new dough should be created, and the ingredients should be deleted
>       assert len(final_doughs) > len(initial_doughs)
E       assert 0 > 0
E        +  where 0 = len(set())
E        +  and   0 = len(set())

tests/test_transition_rules.py:1522: AssertionError