Skip to content

Commit fc52e94

Browse files
committed
test
1 parent 866bb4c commit fc52e94

File tree

9 files changed

+71
-16
lines changed

9 files changed

+71
-16
lines changed

.github/workflows/build-docs.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches:
8+
- "dev"
9+
- "feat/docs_ci"
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# Single deploy job since we're just deploying
28+
deploy:
29+
environment:
30+
name: github-pages
31+
url: ${{ steps.deployment.outputs.page_url }}
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
37+
- name: Setup Python 3.10
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: "3.10"
41+
cache: "pip"
42+
43+
- name: Install dependencies
44+
run: |
45+
pip install .[docs]
46+
47+
- name: Setup Pages
48+
uses: actions/configure-pages@v5
49+
50+
- name: Build docs
51+
run: |
52+
make docs
53+
54+
- name: Upload artifact
55+
uses: actions/upload-pages-artifact@v3
56+
with:
57+
# Upload entire repository
58+
path: 'docs/_build/html'
59+
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

autointent/context/embedder.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616

1717

1818
class EmbedderDumpMetadata(TypedDict):
19-
"""
20-
Metadata for saving and loading an Embedder instance.
21-
"""
19+
"""Metadata for saving and loading an Embedder instance."""
2220

2321
batch_size: int
2422
"""Batch size used for embedding calculations."""

autointent/modules/base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ def score(self, context: Context, metric_fn: METRIC_FN) -> float:
4040

4141
@abstractmethod
4242
def get_assets(self) -> Artifact:
43-
"""
44-
Return useful assets that represent intermediate data into context.
45-
46-
"""
43+
"""Return useful assets that represent intermediate data into context."""
4744

4845
@abstractmethod
4946
def clear_cache(self) -> None:

autointent/modules/prediction/base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ def score(self, context: Context, metric_fn: PredictionMetricFn) -> float:
5353
return metric_fn(labels, self._predictions)
5454

5555
def get_assets(self) -> PredictorArtifact:
56-
"""
57-
Return useful assets that represent intermediate data into context.
58-
59-
"""
56+
"""Return useful assets that represent intermediate data into context."""
6057
return PredictorArtifact(labels=self._predictions)
6158

6259
def clear_cache(self) -> None:

autointent/modules/scoring/dnnc/dnnc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ class DNNCScorer(ScoringModule):
4949
archivePrefix={arXiv},
5050
primaryClass={cs.CL},
5151
url={https://arxiv.org/abs/2010.13009},
52-
}
52+
}
53+
5354
"""
5455

5556
name = "dnnc"

docs/source/learn/dialogue_systems.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Dialogue Systems
44
В этом разделе вы познакомитесь с основами построения диалоговых систем.
55

66
Intents
7-
-----
7+
-------
88

99
Диалоговая система в широком смысле --- это текстовый интерфейс взаимодействия с некоторым сервисом (будь то сервис по заказу еды или по получению информации о банковском счете). Обычно сервис поддерживает конечное количество API методов, которые вызываются во время диалога с пользователем. Чтобы определить, какой метод нужен в данный момент диалога используются классификаторы интентов. Если рассуждать в терминах машинного обучения, то это задача классификации текстов.
1010

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ target-version = "py310"
7676
[tool.ruff.lint]
7777
select = ["ALL"]
7878
ignore = [
79-
"D", # pydocstyle
8079
"TD", # todos
8180
"FIX", # fixmes
8281
"S311", # random usage
@@ -92,7 +91,7 @@ ignore = [
9291
"autointent/modules/*" = ["ARG002", "ARG003"] # unused argument
9392
"docs/*" = ["INP001", "A001", "D"]
9493
"*/utils.py" = ["D104", "D100"]
95-
"tutorials/*" = ["INP001", "T"]
94+
"tutorials/*" = ["INP001", "T", "D"]
9695

9796
[tool.ruff.lint.pylint]
9897
max-args = 10

tutorials/modules/prediction/argmax.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
# %%
1919
predictor = ArgmaxPredictor()
2020
scores = np.array([[0.1, 0.9], [0.8, 0.2], [0.3, 0.7]])
21+
predictor.fit(scores, [0, 1, 0])
2122
predictions = predictor.predict(scores)
2223
np.testing.assert_array_equal(predictions, np.array([1, 0, 1]))

tutorials/pipeline_optimization/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ def optimize(task_type: TaskType) -> None:
5555

5656

5757
# %%
58-
optimize("multiclass")
58+
# optimize("multiclass")

0 commit comments

Comments
 (0)