File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed
Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,11 @@ async def _generate_from_intrinsic(
251251 if not ctx .is_chat_context :
252252 raise Exception ("Does not yet support non-chat contexts." )
253253
254+ if len (model_options .items ()) > 0 :
255+ FancyLogger .get_logger ().info (
256+ "passing in model options when generating with an adapter; some model options may be overwritten / ignored"
257+ )
258+
254259 linearized_ctx = ctx .view_for_generation ()
255260 assert linearized_ctx is not None , (
256261 "If ctx.is_chat_context, then the context should be linearizable."
@@ -316,11 +321,6 @@ async def _generate_from_intrinsic(
316321 for model_option in model_options :
317322 if model_option == ModelOption .TEMPERATURE :
318323 request_json ["temperature" ] = model_options [model_option ]
319- else :
320- raise ValueError (
321- f"Model option '{ model_option } ' not implemented "
322- f"on this generation code path."
323- )
324324
325325 rewritten = rewriter .transform (request_json , ** action .intrinsic_kwargs )
326326
Original file line number Diff line number Diff line change @@ -440,11 +440,6 @@ async def _generate_from_intrinsic(
440440 for model_option in model_options :
441441 if model_option == ModelOption .TEMPERATURE :
442442 request_json ["temperature" ] = model_options [model_option ]
443- else :
444- raise ValueError (
445- f"Model option '{ model_option } ' not implemented "
446- f"on this generation code path."
447- )
448443
449444 rewritten = rewriter .transform (request_json , ** action .intrinsic_kwargs )
450445
Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ def _call_intrinsic(
6464 intrinsic ,
6565 context ,
6666 backend ,
67- # No rejection sampling, please
6867 model_options = {ModelOption .TEMPERATURE : 0.0 },
68+ # No rejection sampling, please
6969 strategy = None ,
7070 )
7171
You can’t perform that action at this time.
0 commit comments