Skip to content

Commit 803d8b2

Browse files
authored
Merge pull request #55 from eli5-org/llm-docs
Include LLM into the API docs
2 parents 3219fdf + eed107c commit 803d8b2

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ sphinx_rtd_theme
44
ipython
55
pandas
66
Pillow
7+
openai
78
-r ../requirements.txt

docs/source/autodocs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ API documentation is auto-generated.
1616
./lightgbm
1717
./catboost
1818
./permutation_importance
19+
./llm
1920
./keras
2021
./base
2122

docs/source/autodocs/llm.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
eli5.llm
2+
========
3+
4+
.. automodule:: eli5.llm.explain_prediction
5+
:members:

docs/source/tutorials/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Tutorials
1010
./black-box-text-classifiers
1111
./xgboost-titanic
1212
./sklearn_crfsuite
13-
./keras-image-classifiers
13+
./explain_llm_logprobs
14+
./keras-image-classifiers

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from os.path import dirname
32
from os.path import join
43
import csv
@@ -27,7 +26,7 @@ def _get_newsgroups(binary=False, remove_chrome=False, test=False, size=SIZE):
2726
subset = 'test' if test else 'train'
2827
data = fetch_20newsgroups(subset=subset, categories=categories,
2928
shuffle=True, random_state=42,
30-
remove=remove)
29+
remove=remove, n_retries=5, delay=5.0)
3130
assert data.target_names == categories
3231
return data.data[:size], data.target[:size], data.target_names
3332

@@ -51,6 +50,7 @@ def newsgroups_train_big():
5150
def newsgroups_train_binary_big():
5251
return _get_newsgroups(binary=True, remove_chrome=True, size=1000)
5352

53+
5454
class Bunch(dict):
5555
"""Container object for datasets: dictionary-like object that
5656
exposes its keys as attributes."""

0 commit comments

Comments
 (0)