Repository: pykeen/pykeen
Issue: Error when running replicate_best_pipeline() with result_tracker specified
Root cause: Configuration Error

### Describe the bug

I am trying to run `replicate_best_pipeline()` method of `pykeen.hpo.HpoPipelineResult` after having specified a `result_tracker`, as shown in the below code block.

```python
result = hpo_pipeline(
    model='TransE',
    dataset='nations',
    stopper='early',
    result_tracker='mlflow',
    result_tracker_kwargs=dict(
        tracking_uri='http://localhost:5000',
        experiment_name='Tutorial Training of TransE on Nations',
    ),
    n_trials=3,
)
result.save_to_directory('./trans_e')

result.replicate_best_pipeline(directory='./best_trans_e', replicates=2)
```

When running the above code, there is this error: `ValueError: Keyword arguments were given but no query` raised by `make_many()` method of `class_resolver.api.ClassResolver`.

However, when I omit the use of result tracker (see below), there is no such error and the execution is as expected.

```python
result = hpo_pipeline(
    model='TransE',
    dataset='nations',
    stopper='early',
    n_trials=3,
)
result.save_to_directory('./trans_e')

result.replicate_best_pipeline(directory='./best_trans_e', replicates=2)
```

### How to reproduce

To reproduce the issue, one can run the below code block.

```python
result = hpo_pipeline(
    model='TransE',
    dataset='nations',
    stopper='early',
    result_tracker='mlflow',
    result_tracker_kwargs=dict(
        tracking_uri='http://localhost:5000',
        experiment_name='Tutorial Training of TransE on Nations',
    ),
    n_trials=3,
)
result.save_to_directory('./trans_e')

result.replicate_best_pipeline(directory='./best_trans_e', replicates=2)
```

### Environment

| Key             | Value                    |
|-----------------|--------------------------|
| OS              | nt                       |
| Platform        | Windows                  |
| Release         | 10                       |
| Time            | Tue Jan 17 18:01:01 2023 |
| Python          | 3.8.10                   |
| PyKEEN          | 1.9.0                    |
| PyKEEN Hash     | UNHASHED                 |
| PyKEEN Branch   |                          |
| PyTorch         | 1.13.1+cpu               |
| CUDA Available? | false                    |
| CUDA Version    | N/A                      |
| cuDNN Version   | N/A                      |

### Additional information

### Stack trace

```
Traceback (most recent call last):
  File "C:\Users\Antonis\Documents\Projects\kge_experiments\main.py", line 24, in <module>
    result.replicate_best_pipeline(directory='./best_trans_e', replicates=2)
  File "C:\Users\Antonis\AppData\Local\pypoetry\Cache\virtualenvs\kge-experiments-5Wok81kx-py3.8\lib\site-packages\pykeen\hpo\hpo.py", line 466, in replicate_best_pipeline
    replicate_pipeline_from_config(
  File "C:\Users\Antonis\AppData\Local\pypoetry\Cache\virtualenvs\kge-experiments-5Wok81kx-py3.8\lib\site-packages\pykeen\pipeline\api.py", line 582, in replicate_pipeline_from_config
    save_pipeline_results_to_directory(
  File "C:\Users\Antonis\AppData\Local\pypoetry\Cache\virtualenvs\kge-experiments-5Wok81kx-py3.8\lib\site-packages\pykeen\pipeline\api.py", line 715, in save_pipeline_results_to_directory
    for i, pipeline_result in enumerate(pipeline_results):
  File "C:\Users\Antonis\AppData\Local\pypoetry\Cache\virtualenvs\kge-experiments-5Wok81kx-py3.8\lib\site-packages\pykeen\pipeline\api.py", line 581, in <genexpr>
    pipeline_results = (pipeline_from_config(config, discard_seed=not keep_seed, **kwargs) for _ in range(replicates))
  File "C:\Users\Antonis\AppData\Local\pypoetry\Cache\virtualenvs\kge-experiments-5Wok81kx-py3.8\lib\site-packages\pykeen\pipeline\api.py", line 783, in pipeline_from_config
    return pipeline(
  File "C:\Users\Antonis\AppData\Local\pypoetry\Cache\virtualenvs\kge-experiments-5Wok81kx-py3.8\lib\site-packages\pykeen\pipeline\api.py", line 1065, in pipeline
    _result_tracker = resolve_result_trackers(result_tracker, result_tracker_kwargs)
  File "C:\Users\Antonis\AppData\Local\pypoetry\Cache\virtualenvs\kge-experiments-5Wok81kx-py3.8\lib\site-packages\pykeen\trackers\__init__.py", line 58, in resolve_result_trackers
    trackers = tracker_resolver.make_many(queries=result_tracker, kwargs=result_tracker_kwargs)
  File "C:\Users\Antonis\AppData\Local\pypoetry\Cache\virtualenvs\kge-experiments-5Wok81kx-py3.8\lib\site-packages\class_resolver\api.py", line 340, in make_many
    raise ValueError("Keyword arguments were given but no query")
ValueError: Keyword arguments were given but no query

Process finished with exit code 1
```

### Issue Template Checks

- [X] This is not a feature request (use a different issue template if it is)
- [X] This is not a question (use the [discussions](https://github.com/pykeen/pykeen/discussions/new) forum instead)
- [X] I've read the text explaining why including environment information is important and understand if I omit this information that my issue will be dismissed

I can reproduce the error with this slighly reduced code:
```python
from pykeen.hpo import hpo_pipeline

result = hpo_pipeline(
    model="TransE",
    dataset="nations",
    stopper="early",
    result_tracker="console",
    training_kwargs=dict(num_epochs=1),
    result_tracker_kwargs=dict(metric_filter=".*"),
    n_trials=1,
)
result.save_to_directory("./trans_e")
result.replicate_best_pipeline(directory="./best_trans_e", replicates=2)
```

The problems seems to lie in `./trans_e/best_pipeline/pipeline_config.json`, which contains `result_tracker_kwargs`, but not `result_tracker`. As a hotfix, you can manually fix this by either deleting the excessive key `result_tracker_kwargs`, or adding a `result_tracker`.

@mberr I can verify that the hotfix works, thanks!

### Proposed fix
After some debugging I found out that the issue is caused by the fact that the `_get_best_study_config()` method of `pykeen.hpo.HpoPipelineResult` does not add the `result_tracker` parameter in the `pipeline_config` dict.

So, I made a fix in [the relevant PR](https://github.com/pykeen/pykeen/pull/1206) which I tested as following:

1. I ran [your reduced code](https://github.com/pykeen/pykeen/issues/1205#issuecomment-1385821740).
    **Result**: `pipeline_config.json` includes the following parameters.
    ```json
    "result_tracker": "console",
    "result_tracker_kwargs": {
      "metric_filter": ".*"
    },
    ```
3. I ran [my code](https://github.com/pykeen/pykeen/issues/1205#issue-1536745628).
    **Result**: `pipeline_config.json` includes the following parameters.
    ```json
    "result_tracker": "mlflow",
    "result_tracker_kwargs": {
      "experiment_name": "Tutorial Training of TransE on Nations",
      "tracking_uri": "http://localhost:5000"
    },
    ```
4. I ran [my code](https://github.com/pykeen/pykeen/issues/1205#issue-1536745628) but with `result_tracker=MLFlowResultTracker` instead of `result_tracker='mlflow'`.
    **Result**: `pipeline_config.json` includes the following parameters.
    ```json
    "result_tracker": "mlflow",
    "result_tracker_kwargs": {
      "experiment_name": "Tutorial Training of TransE on Nations",
      "tracking_uri": "http://localhost:5000"
    },
    ```
5. I ran [my code](https://github.com/pykeen/pykeen/issues/1205#issue-1536745628) without defining parameters `result_tracker` and `result_tracker_kwargs`.
    **Result**: `pipeline_config.json` does not include neither `result_tracker` nor `result_tracker_kwargs` parameters.

Thus, in all above cases the behavior was as expected.


Closed by https://github.com/pykeen/pykeen/commit/c15b7a474542940d24fdf85158df1268ca192ac9

Thanks again @AntonisKl for your PR!