Skip to content

Commit 6361769

Browse files
update branch
1 parent a2bea8f commit 6361769

67 files changed

Lines changed: 872456 additions & 56248 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/source/conf.py

Lines changed: 72 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
import os
1010
import sys
1111

12-
sys.path.insert(0, os.path.abspath("../../dialogue2graph"))
12+
sys.path.insert(0, os.path.abspath("../../dialog2graph"))
1313

14-
project = "Dialogue2Graph"
15-
copyright = "2024, Denis Kuznetsov, Anastasia Voznyuk, Andrey Chirkin"
16-
author = "Denis Kuznetsov, Anastasia Voznyuk, Andrey Chirkin"
14+
project = "Dialog2Graph"
15+
copyright = "2025, Denis Kuznetsov, Anastasia Voznyuk, Andrey Chirkin, Anna Mikhailova, Maria Molchanova, Yuri Peshkichev"
16+
author = "Denis Kuznetsov, Anastasia Voznyuk, Andrey Chirkin, Anna Mikhailova, Maria Molchanova, Yuri Peshkichev"
1717

1818
# Get the deployment environment
1919
on_github = os.environ.get("GITHUB_ACTIONS") == "true"
2020

2121
# Configure URLs for GitHub Pages
2222
if on_github:
23-
html_baseurl = "/dialogue2graph/dev/"
23+
html_baseurl = "/dialog2graph/dev/"
2424
html_context = {
2525
"display_github": True,
2626
"github_user": "deeppavlov",
27-
"github_repo": "dialogue2graph",
27+
"github_repo": "dialog2graph",
2828
"github_version": "dev",
2929
"conf_py_path": "/docs/source/",
3030
}
@@ -34,45 +34,75 @@
3434

3535
extensions = [
3636
"sphinx.ext.autodoc",
37+
"sphinx.ext.autosummary",
38+
"sphinx.ext.doctest",
39+
"autoapi.extension",
40+
"sphinx.ext.intersphinx",
41+
"sphinx.ext.todo",
42+
"sphinx.ext.coverage",
3743
"sphinx.ext.viewcode",
3844
"sphinx.ext.napoleon",
3945
"sphinx.ext.extlinks",
4046
"sphinx_autodoc_typehints",
41-
"sphinxcontrib.apidoc",
47+
"sphinx.ext.graphviz",
4248
]
4349

44-
templates_path = ["_templates"]
45-
4650
autodoc_default_options = {
4751
"members": True,
4852
"undoc-members": False,
49-
"private-members": False,
53+
"private-members": True,
5054
"special-members": "__call__",
5155
"member-order": "bysource",
5256
"exclude-members": "_abc_impl, model_fields, model_computed_fields, model_config",
5357
}
5458

55-
# Mock imports that cause issues
56-
autodoc_mock_imports = ["datasets"]
57-
58-
apidoc_module_dir = "../../dialogue2graph"
59-
apidoc_output_dir = "reference"
59+
autodoc_typehints = "both"
6060

61+
autoapi_dirs = ["../../dialog2graph"]
62+
autoapi_options = [
63+
"members",
64+
"undoc-members",
65+
"show-inheritance",
66+
"show-module-summary",
67+
"special-members",
68+
"imported-members",
69+
]
70+
suppress_warnings = ["autoapi.python_import_resolution"]
71+
autoapi_ignore = ["*/cli/*.py"]
72+
73+
napoleon_google_docstring = True
74+
napoleon_include_init_with_doc = False
75+
napoleon_include_private_with_doc = False
76+
napoleon_include_special_with_doc = True
77+
napoleon_use_admonition_for_examples = False
78+
napoleon_use_admonition_for_notes = False
79+
napoleon_use_admonition_for_references = False
80+
napoleon_use_ivar = False
81+
napoleon_use_param = True
82+
napoleon_use_rtype = True
83+
napoleon_preprocess_types = False
84+
napoleon_type_aliases = None
85+
napoleon_attr_annotations = True
6186

6287
# -- Options for HTML output -------------------------------------------------
6388
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
6489

6590
# html_theme = 'alabaster'
6691
html_theme = "pydata_sphinx_theme"
6792

93+
# Add any paths that contain templates here, relative to this directory.
94+
templates_path = ["_templates"]
95+
6896
# Add any paths that contain custom static files (such as style sheets) here,
6997
# relative to this directory. They are copied after the builtin static files,
7098
# so a file named "default.css" will overwrite the builtin "default.css".
7199
html_static_path = ["_static"]
72100

101+
html_show_sourcelink = False
102+
73103
extlinks = {
74104
"github_source_link": (
75-
"https://github.com/deeppavlov/dialogue2graph/tree/dev/%s",
105+
"https://github.com/deeppavlov/dialog2graph/tree/dev/%s",
76106
None,
77107
),
78108
}
@@ -83,22 +113,45 @@
83113
"scripts/bootstrap.js",
84114
"scripts/fontawesome.js",
85115
]
116+
html_css_files = [
117+
"css/custom.css",
118+
]
86119

87120
# Fix base URL for GitHub Pages
88-
html_baseurl = "/dialogue2graph/dev/"
121+
html_baseurl = "/dialog2graph/dev/"
89122

90123
# Important: Add this to handle static files correctly
91124
html_theme_options = {
125+
"header_links_before_dropdown": 6,
92126
"use_edit_page_button": False,
93127
"navigation_depth": 3,
94128
"show_toc_level": 2,
95129
# Add this to fix static file paths
96-
"static_page_path": "/dialogue2graph/dev/_static/",
130+
"static_page_path": "/dialog2graph/dev/_static/",
131+
"icon_links": [
132+
{
133+
"name": "GitHub",
134+
"url": "https://github.com/deeppavlov/dialog2graph",
135+
"icon": "fa-brands fa-github",
136+
"type": "fontawesome",
137+
},
138+
],
139+
"secondary_sidebar_items": ["example-links", "page-toc"],
97140
}
98141

99142
# Fix relative URLs for GitHub Pages deployment
100143
html_use_relative_paths = True
101144

102145
# Ensure all static paths are properly prefixed for GitHub Pages
103146
if os.environ.get("GITHUB_ACTIONS") == "true":
104-
html_static_path_suffix = "/dialogue2graph/dev"
147+
html_static_path_suffix = "/dialog2graph/dev"
148+
149+
150+
def skip_submodules(app, what, name, obj, skip, options):
151+
if what == "module" and "." not in name:
152+
skip = True
153+
return skip
154+
155+
156+
def setup(sphinx):
157+
sphinx.connect("autoapi-skip-member", skip_submodules)

docs/source/reference/dialogue2graph.cli.rst

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/source/reference/dialogue2graph.datasets.complex_dialogues.rst

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/source/reference/dialogue2graph.datasets.core.rst

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/source/reference/dialogue2graph.datasets.rst

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/source/reference/dialogue2graph.rst

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/source/reference/modules.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/basics/basic_usage.ipynb

Lines changed: 0 additions & 172 deletions
This file was deleted.

experiments/exp2025_03_12_rec_models_incrementation/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
## Experiment setup
44

5-
The incremental approach was tested with the recommended generation models which are: o1-mini, o3-mini, and chatgpt-4o-latest. Test data is example 13 (serial number) from synthetic data subset called "generated_24". This example is one graph with four dialogues sampled from this graph.
5+
The incremental approach was tested with the recommended generation models which are: o1-mini, o3-mini, and chatgpt-4o-latest. Test data is example 13 (serial number) from synthetic data subset called "generated_24". This example is one graph with four dialogs sampled from this graph.
66
Tested incrementation pipeline:
77
1. take a graph from the example as a true graph
8-
2. generate the first graph from the first dialogue in the example (same generation method for all models)
9-
3. generate the next 3 graphs subsequently using the selected incrementation method, adding new dialogues one by one (i.e. in the end we get 4 graphs - for dialogue 0, dialogues 0-1, dialogues 0-2, dialogues 0-3)
8+
2. generate the first graph from the first dialog in the example (same generation method for all models)
9+
3. generate the next 3 graphs subsequently using the selected incrementation method, adding new dialogs one by one (i.e. in the end we get 4 graphs - for dialog 0, dialogs 0-1, dialogs 0-2, dialogs 0-3)
1010
4. if generation is successful, get metrics for the last incremental graph and the true graph
1111

1212
## Results and observations
1313
1. The best result was obtained using the ThreeStagesGenerator method and o3-mini as a generation model.
1414
2. AppendChain method doesn't work well for this task, regardless of the generation model.
1515
3. chatgpt-4o-latest model has tendency to fail graph generation (returns error with incorrect output format).
16-
4. In the dialogue 0 two assistant's utterances are the same - doesn't matter?
16+
4. In the dialog 0 two assistant's utterances are the same - doesn't matter?
1717

1818
## Future plans and suggestions
1919
1. Test ThreeStagesGenerator with o3-mini on more complex examples (or on all the dataset), get metrics +/- error analysis
2020
2. Test other pipelines:
21-
- take the longest dialogue as the first one and continue as before
22-
- take all the dialogues at once and generate a general graph of them
21+
- take the longest dialog as the first one and continue as before
22+
- take all the dialogs at once and generate a general graph of them

experiments/exp2025_03_12_rec_models_incrementation/data/gen24_graphid13_incremental_chatgpt-4o-latest_AppCh.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"dialogues": [
2+
"dialogs": [
33
{
44
"messages": [
55
{

0 commit comments

Comments
 (0)