MCPcopy Create free account
hub / github.com/apple/ml-llarp / __init__

Method __init__

llarp/task/predicate_task.py:36–65  ·  view source on GitHub ↗
(self, *args, sim, config, dataset, **kwargs)

Source from the content-addressed store, hash-verified

34@registry.register_task(name="RearrangePredicateTask-v0")
35class RearrangePredicateTask(RearrangeTask):
36 def __init__(self, *args, sim, config, dataset, **kwargs):
37 print(f"Num episodes {len(dataset.episodes)}")
38
39 self._all_cls, obj_cats, self._name_to_cls = get_category_info(
40 config.skip_load_receps
41 )
42
43 self.pddl = get_pddl(config, self._all_cls, obj_cats)
44 self._fix_agent_pos = config.fix_agent_pos
45
46 super().__init__(
47 *args,
48 sim=sim,
49 config=config,
50 dataset=dataset,
51 should_place_articulated_agent=not self._fix_agent_pos,
52 **kwargs,
53 )
54 self._tokenizer = get_parser(config.tokenizer_name)
55
56 self._start_template = self._config.start_template
57 self._goal_template = self._config.goal_template
58 self._sample_entities = self._config.sample_entities
59 self._sample_entities_use_constant_sampling = (
60 self._config.sample_entities_use_constant_sampling
61 )
62 self._force_scene_per_worker = self._config.force_scene_per_worker
63 self._goal_expr = None
64 self._is_first_reset = True
65 self._is_freeform = False
66
67 @property
68 def tokenizer(self):

Callers

nothing calls this directly

Calls 3

get_category_infoFunction · 0.90
get_pddlFunction · 0.90
get_parserFunction · 0.90

Tested by

no test coverage detected