@@ -271,6 +271,9 @@ def _init_hints_index(self):
271271 """Initialize the block."""
272272 try :
273273 if self .flags .hint_type == "docs" :
274+ if self .flags .hint_index_type == "direct" :
275+ print ("WARNING: Hint index type 'direct' is not supported for docs. Using 'sparse' instead." )
276+ self .flags .hint_index_type = "sparse"
274277 if self .flags .hint_index_type == "sparse" :
275278 import bm25s
276279
@@ -323,18 +326,19 @@ def _get_task_hints(self) -> list[str]:
323326 return []
324327
325328 if self .flags .hint_type == "docs" :
329+ if self .flags .hint_index_type == "direct" :
330+ print ("WARNING: Hint index type 'direct' is not supported for docs. Using 'sparse' instead." )
331+ self .flags .hint_index_type = "sparse"
326332 if not hasattr (self , "hint_index" ):
327- print ("Initializing hint index new time" )
328- # @patricebechard It seems _.init() method is missing do we still need it?
329- # self._init()
333+ print ("WARNING: Hint index not initialized. Initializing now." )
334+ self ._init_hints_index ()
330335 if self .flags .hint_query_type == "goal" :
331336 query = self .obs_history [- 1 ]["goal_object" ][0 ]["text" ]
332337 elif self .flags .hint_query_type == "llm" :
333338 queries , _ = self ._get_queries ()
334339 # HACK: only 1 query supported
335340 query = queries [0 ]
336341 else :
337- # @patricebechard: This raises an error with the default value 'direct'
338342 raise ValueError (f"Unknown hint query type: { self .flags .hint_query_type } " )
339343
340344 print (f"Query: { query } " )
0 commit comments