code
stringlengths
3
6.57k
kwargs (:obj:`Dict[str, Any]`)
kwargs.pop("return_unused_kwargs", False)
cls(**config_dict)
hasattr(config, "pruned_heads")
dict((int(key)
config.pruned_heads.items()
kwargs.items()
hasattr(config, key)
setattr(config, key, value)
to_remove.append(key)
kwargs.pop(key, None)
logger.info(f"Model config {config}")
from_json_file(cls, json_file: Union[str, os.PathLike])
json_file (:obj:`str` or :obj:`os.PathLike`)
cls._dict_from_json_file(json_file)
cls(**config_dict)
_dict_from_json_file(cls, json_file: Union[str, os.PathLike])
open(json_file, "r", encoding="utf-8")
reader.read()
json.loads(text)
__eq__(self, other)
__repr__(self)
self.to_json_string()
to_diff_dict(self)
self.to_dict()
PretrainedConfig()
to_dict()
self.__class__()
to_dict()
config_dict.items()
or (key in class_config_dict and value != class_config_dict[key])
self.dict_torch_dtype_to_str(serializable_config_dict)
to_dict(self)
copy.deepcopy(self.__dict__)
hasattr(self.__class__, "model_type")
self.dict_torch_dtype_to_str(output)
to_json_string(self, use_diff: bool = True)
use_diff (:obj:`bool`, `optional`, defaults to :obj:`True`)
PretrainedConfig()
self.to_diff_dict()
self.to_dict()
json.dumps(config_dict, indent=2, sort_keys=True)
to_json_file(self, json_file_path: Union[str, os.PathLike], use_diff: bool = True)
json_file_path (:obj:`str` or :obj:`os.PathLike`)
use_diff (:obj:`bool`, `optional`, defaults to :obj:`True`)
PretrainedConfig()
open(json_file_path, "w", encoding="utf-8")
writer.write(self.to_json_string(use_diff=use_diff)
update(self, config_dict: Dict[str, Any])
config_dict (:obj:`Dict[str, Any]`)
config_dict.items()
setattr(self, key, value)
update_from_string(self, update_str: str)
update_str (:obj:`str`)
dict(x.split("=")
update_str.split(",")
d.items()
hasattr(self, k)
ValueError(f"key {k} isn't in the original config dict")
getattr(self, k)
isinstance(old_v, bool)
v.lower()
v.lower()
ValueError(f"can't derive true or false from {v} (key {k})
isinstance(old_v, int)
int(v)
isinstance(old_v, float)
float(v)
isinstance(old_v, str)
setattr(self, k, v)
dict_torch_dtype_to_str(self, d: Dict[str, Any])
d.get("torch_dtype", None)
isinstance(d["torch_dtype"], str)
str(d["torch_dtype"])
split(".")
copy_func(PretrainedConfig.push_to_hub)
O(M * U + N)
O(U)
O(M)
O(1)
countContainedPermutations(bigString, smallString)
len(bigString)
len(smallString)
matchCounts(bigCount, smallCount)
matchCounts(bigCount, smallCount)
NA_Syndra_Jng_Aatrox(Ratings)
NA_Syndra_Jng_Ahri(Ratings)
NA_Syndra_Jng_Akali(Ratings)
NA_Syndra_Jng_Alistar(Ratings)
NA_Syndra_Jng_Amumu(Ratings)
NA_Syndra_Jng_Anivia(Ratings)
NA_Syndra_Jng_Annie(Ratings)
NA_Syndra_Jng_Ashe(Ratings)
NA_Syndra_Jng_AurelionSol(Ratings)
NA_Syndra_Jng_Azir(Ratings)
NA_Syndra_Jng_Bard(Ratings)
NA_Syndra_Jng_Blitzcrank(Ratings)
NA_Syndra_Jng_Brand(Ratings)
NA_Syndra_Jng_Braum(Ratings)
NA_Syndra_Jng_Caitlyn(Ratings)