Repository: pykeen/pykeen
Issue: Predict top-k cost lot of time
Root cause: Documentation Deficiency

### Describe the bug

When I try to use `get_all_prediction_df` function on gpu, It seems to cost such a long time to finish ,nearly over 4000 hours, and the gpu usage is nearly full. And use my own dataset,which `num_tripple` is 301562,and `num_entities` is 81823. It's that normal?  Or is that caused by my GPU?

### How to reproduce

```
from pykeen.models import predict
import os
import matplotlib.pyplot as plt
import torch
import pykeen
from pykeen.pipeline import pipeline
from pykeen.triples import TriplesFactory
tf=TriplesFactory.from_path("./dataset/dblp_1980/dblp_e_pykneen.tsv")
training, testing, validation = tf.split([.8, .1, .1])
result=pipeline(
    stopper='early',
    device="cuda:0",
    training=training,
    testing=testing,
    validation=validation,
    optimizer='Adam',
    model="TuckER",
    loss='softplus',
    training_loop='sLCWA',
    negative_sampler='bernoulli',
    model_kwargs=dict(embedding_dim=100),
    optimizer_kwargs=dict(lr=1.0e-1),
    training_kwargs=dict(
        num_epochs=5,
        checkpoint_name='TuckER.pt',
        batch_size=32,
        use_tqdm_batch=True
    ),
    
)
result.save_to_directory('results')
result.metric_results.to_df()
result.model.get_all_prediction_df(k=2,triples_factory=result.training)
```

### Environment

| Key             | Value                    |
|-----------------|--------------------------|
| OS              | posix                    |
| Platform        | Linux                    |
| Release         | 5.13.0-30-generic        |
| Time            | Mon Feb 21 11:30:34 2022 |
| Python          | 3.9.7                    |
| PyKEEN          | 1.7.0                    |
| PyKEEN Hash     | UNHASHED                 |
| PyKEEN Branch   |                          |
| PyTorch         | 1.10.0+cu113             |
| CUDA Available? | true                     |
| CUDA Version    | 11.3                     |
| cuDNN Version   | 8200                     |

### Additional information

_No response_

Yes, that's expected behavior - you are calling a function to score _all_ possible triple combinations, which is equivalent to `|E| x |R| x |E|` with E entities and R relation types. The `k` parameter will keep the top scores, but it would still need to compute all possible scores. In your case you'd have at least 6.5 * |R| **billion** possible triples - is that really what you want? :) 

Btw there were similar questions about this function, eg #269 

Thank you for asking me so quickly and  clearly. I still have some other stupid questions. 
Firstly,  how I just get predict triple on testing data, not the hole data? Predict their head and tail separately?  Should I use `predict` method or use `get_head_prediction` and `get_tail_prediction` in a for loop to traversal the testing data?
Secondly, I try to use 5% `yago` dataset to train a model, but I found that the `hit@k` performed really bad, my best hit@10 is just 0.2. Is it the ability of the current model or the parameter problem of my training model? 
I'm really new in kg area, thank you for you to answer me so patiently.

If you only want to see the scores for a given set of test triples, you can use [`pykeen.models.predict.predict_triples_df`](https://pykeen.readthedocs.io/en/stable/api/pykeen.models.predict.predict_triples_df.html).

I  want to get the testing data predict head and tail and get the topk of them. Just like`  h ,r , t` from testing data ,predict the top k` h,r,t' `and` h',r t`. 
Maybe I already know how to do,  thank you very much for providing me such a helpful advice.

Okay, in that case, [`get_head_prediction_df`](https://pykeen.readthedocs.io/en/stable/api/pykeen.models.predict.get_head_prediction_df.html) and [`get_tail_prediction_df`](https://pykeen.readthedocs.io/en/stable/api/pykeen.models.predict.get_tail_prediction_df.html) are what you are looking for.

Thanks a lot. You can close this issue.