Skip to content

Commit

Permalink
Address mutable object as default param remark.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bock committed Aug 2, 2023
1 parent 65c4247 commit bfab326
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ def _test_generative_decoding(
device="cpu",
use_cache=False,
decoder_only=False,
generation_config_update={"num_beams": 1, "do_sample": False},
generation_config_update=None,
tokenizer=None,
gen_kwargs={},
gen_kwargs=None,
):
if generation_config_update is None:
generation_config_update = {"num_beams": 1, "do_sample": False}

if gen_kwargs is None:
gen_kwargs = {}

if device == "xla":
import torch_xla.core.xla_model as xm

Expand Down

0 comments on commit bfab326

Please sign in to comment.