def __init__(self, assets_dir=None, requirements_file="requirements.yml"):
        self.assets_dir = assets_dir or Path(".") / "assets"
        self.requirements = GroupedRequirements()
        self.requirements.load(requirements_file)
        self.temp_dir = mkdtemp()
def _apply_mask(y_true, sample_weight, masked_tokens, dtype):
  if sample_weight is None:
    sample_weight = tf.ones_like(y_true, dtype)
  else:
    sample_weight = tf.cast(sample_weight, dtype)
  for token in masked_tokens:
    mask = tf.cast(tf.not_equal(y_true, token), dtype)
    sample_weight = sample_weight * mask
  return sample_weight