Constants¶
Constants for PyKEEN.
-
PYKEEN_BENCHMARKS: pathlib.Path = PosixPath('/home/docs/.data/pykeen/benchmarks')¶ A subdirectory of the PyKEEN data folder for benchmarks, defaults to
~/.data/pykeen/benchmarks
-
PYKEEN_CHECKPOINTS: pathlib.Path = PosixPath('/home/docs/.data/pykeen/checkpoints')¶ A subdirectory of the PyKEEN data folder for checkpoints, defaults to
~/.data/pykeen/checkpoints
-
PYKEEN_DATASETS: pathlib.Path = PosixPath('/home/docs/.data/pykeen/datasets')¶ A subdirectory of the PyKEEN data folder for datasets, defaults to
~/.data/pykeen/datasets
-
PYKEEN_EXPERIMENTS: pathlib.Path = PosixPath('/home/docs/.data/pykeen/experiments')¶ A subdirectory of the PyKEEN data folder for experiments, defaults to
~/.data/pykeen/experiments
-
PYKEEN_HOME: pathlib.Path = PosixPath('/home/docs/.data/pykeen')¶ A path representing the PyKEEN data folder
-
PYKEEN_LOGS: pathlib.Path = PosixPath('/home/docs/.data/pykeen/logs')¶ A subdirectory for PyKEEN logs
Type hints for PyKEEN.
-
Constrainer¶ A function that can be applied to a tensor to constrain it
alias of Callable[[torch.FloatTensor], torch.FloatTensor]
-
DeviceHint¶ A hint for a
torch.devicealias of Union[None, str, torch.device]
-
class
GaussianDistribution(mean: torch.FloatTensor, diagonal_covariance: torch.FloatTensor)[source]¶ A gaussian distribution with diagonal covariance matrix.
Create new instance of GaussianDistribution(mean, diagonal_covariance)
-
property
diagonal_covariance¶ Alias for field number 1
-
property
mean¶ Alias for field number 0
-
property
-
HeadRepresentation¶ A type variable for head representations used in
pykeen.models.Model,pykeen.nn.modules.Interaction, etc.alias of TypeVar(‘HeadRepresentation’)
-
Initializer¶ A function that can be applied to a tensor to initialize it
alias of Callable[[torch.FloatTensor], torch.FloatTensor]
-
LabeledTriples¶ alias of
numpy.ndarray
-
Mutation¶ A function that mutates the input and returns a new object of the same type as output
alias of Callable[[X], X]
-
Normalizer¶ A function that can be applied to a tensor to normalize it
alias of Callable[[torch.FloatTensor], torch.FloatTensor]
-
RelationRepresentation¶ A type variable for relation representations used in
pykeen.models.Model,pykeen.nn.modules.Interaction, etc.alias of TypeVar(‘RelationRepresentation’)
-
class
ScorePack(result: torch.LongTensor, scores: torch.FloatTensor)[source]¶ A pair of result triples and scores.
Create new instance of ScorePack(result, scores)
-
property
result¶ Alias for field number 0
-
property
scores¶ Alias for field number 1
-
property
-
TailRepresentation¶ A type variable for tail representations used in
pykeen.models.Model,pykeen.nn.modules.Interaction, etc.alias of TypeVar(‘TailRepresentation’)
-
TorchRandomHint¶ A hint for a
torch.Generatoralias of Union[None, str, torch._C.Generator]
-
cast_constrainer(f)[source]¶ Cast a constrainer function with
typing.cast().- Return type
Callable[[FloatTensor],FloatTensor]