Prediction
load_with_metadata(log=None, file=None, skip_by_id=None, **load_kwargs)
Load a dataset from a prediction log directory, extracting metadata such as Hydra overrides
and attach it to the dataset. If log is not provided, load directly from file (backward compatibility).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log
|
str | None
|
Path to the prediction log directory. |
None
|
file
|
str | None
|
Path to the dataset file. |
None
|
skip_by_id
|
list[str] | None
|
Optional list of IDs to drop respective entries from the dataset after loading. |
None
|
**load_kwargs
|
Additional keyword arguments to pass to |
{}
|
Returns:
The loaded dataset, possibly wrapped in DictWithMetadata if loaded from a log directory.
Source code in src/kibad_llm/dataset/prediction.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |