-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix seed from opt in rng sampler of multiwoz_v22 #4736
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comment; Accepting under assumption recommendation there taken
parlai/tasks/multiwoz_v22/agents.py
Outdated
def __init__(self, opt: Opt, shared=None, *args, **kwargs): | ||
self.opt = opt | ||
self.fold = opt["datatype"].split(":")[0] | ||
opt["datafile"] = self.fold | ||
self.dpath = os.path.join(opt["datapath"], "multiwoz_v22") | ||
self.id = "multiwoz_v22" | ||
if self.opt["seed"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would recommend using self.opt.get("seed")
to be safe, but otherwise looks fine.
Actually thinking about this slightly more - nothing actually adds a flag for "seed" to the argparser. How are you passing the "seed" argument down? |
Thanks for replying @moyapchen. I now perform indexing with |
Patch description
Since the support for setting seed in
train_model.py
has been added, we can let user fix the seed in dataset sampler also.Testing steps
Other information