diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0efb5ab..b61bb57 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,8 +1,13 @@ -name: Deploy Sphinx docs to GitHub Pages +name: Build & Deploy Sphinx Docs on: push: - branches: [ main ] + branches: + - page + - main + pull_request: + branches: + - main permissions: contents: read @@ -10,22 +15,76 @@ permissions: id-token: write jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install dependencies + run: | + pip install -r docs/requirements.txt + + - name: Build Sphinx docs + run: | + cd docs + python -m sphinx -b html . _build/html + + - name: Upload artifact (HTML for preview) + uses: actions/upload-artifact@v4 + with: + name: docs-html + path: docs/_build/html + + preview: + if: github.ref == 'refs/heads/page' + needs: build + runs-on: ubuntu-latest + steps: + - name: Download built docs + uses: actions/download-artifact@v4 + with: + name: docs-html + path: ./docs/_build/html + + - name: Configure GitHub Pages preview + uses: actions/configure-pages@v4 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./docs/_build/html + + - name: Deploy preview + id: deployment + uses: actions/deploy-pages@v4 + deploy: + if: github.ref == 'refs/heads/main' + needs: build + runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Download built docs + uses: actions/download-artifact@v4 + with: + name: docs-html + path: ./docs/_build/html - - name: Setup Pages - uses: actions/configure-pages@v4 + - name: Setup Pages + uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./docs/_build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./docs/_build/html - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo index 0d4f192..fbb0571 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file records the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 6ee7cd5529e806f473de3323ad247c53 +config: a32d920eac3b9747d56b69f1dc98ea4c tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/.buildinfo.bak b/docs/_build/html/.buildinfo.bak new file mode 100644 index 0000000..922a84d --- /dev/null +++ b/docs/_build/html/.buildinfo.bak @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. +config: de581c93e813643e7cc922a04766d3b7 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/.doctrees/environment.pickle b/docs/_build/html/.doctrees/environment.pickle index b1e018e..9f070d6 100644 Binary files a/docs/_build/html/.doctrees/environment.pickle and b/docs/_build/html/.doctrees/environment.pickle differ diff --git a/docs/_build/html/.doctrees/index.doctree b/docs/_build/html/.doctrees/index.doctree index 6bfdad3..85329d5 100644 Binary files a/docs/_build/html/.doctrees/index.doctree and b/docs/_build/html/.doctrees/index.doctree differ diff --git a/docs/_build/html/_sources/index.rst.txt b/docs/_build/html/_sources/index.rst.txt index 039e471..b6fc31f 100644 --- a/docs/_build/html/_sources/index.rst.txt +++ b/docs/_build/html/_sources/index.rst.txt @@ -1,36 +1 @@ -.. LLMSQL documentation master file, created by - sphinx-quickstart on Wed Sep 24 11:41:44 2025. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to LLMSQL project -========================== - -.. image:: https://img.shields.io/pypi/v/llmsql - :target: https://pypi.org/project/llmsql/ - -LLMSQL is a Python package for SQL reasoning with LLMs and vLLM inference. - -πŸš€ Features ------------ -- Easy vLLM inference integration -- Evaluator utilities -- HuggingFace + TRL support - -πŸ“¦ Installation ---------------- -.. code-block:: bash - - pip3 install llmsql - -πŸ”— Resources ------------- -- `Source code on GitHub `_ -- `PyPI project `_ -- `Dataset on Hugging Face `_ -- `Example Usages `_ - - -.. toctree:: - :maxdepth: 2 - :caption: Contents: +.. This file exists only because Sphinx requires index.rst diff --git a/docs/_build/html/_static/alabaster.css b/docs/_build/html/_static/alabaster.css new file mode 100644 index 0000000..7e75bf8 --- /dev/null +++ b/docs/_build/html/_static/alabaster.css @@ -0,0 +1,663 @@ +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: Georgia, serif; + font-size: 17px; + background-color: #fff; + color: #000; + margin: 0; + padding: 0; +} + + +div.document { + width: 940px; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 220px; +} + +div.sphinxsidebar { + width: 220px; + font-size: 14px; + line-height: 1.5; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #fff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +div.body > .section { + text-align: left; +} + +div.footer { + width: 940px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +p.caption { + font-family: inherit; + font-size: inherit; +} + + +div.relations { + display: none; +} + + +div.sphinxsidebar { + max-height: 100%; + overflow-y: auto; +} + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0; + margin: -10px 0 0 0px; + text-align: center; +} + +div.sphinxsidebarwrapper h1.logo { + margin-top: -10px; + text-align: center; + margin-bottom: 5px; + text-align: left; +} + +div.sphinxsidebarwrapper h1.logo-name { + margin-top: 0px; +} + +div.sphinxsidebarwrapper p.blurb { + margin-top: 0; + font-style: normal; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: Georgia, serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar ul li.toctree-l1 > a { + font-size: 120%; +} + +div.sphinxsidebar ul li.toctree-l2 > a { + font-size: 110%; +} + +div.sphinxsidebar input { + border: 1px solid #CCC; + font-family: Georgia, serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox { + margin: 1em 0; +} + +div.sphinxsidebar .search > div { + display: table-cell; +} + +div.sphinxsidebar hr { + border: none; + height: 1px; + color: #AAA; + background: #AAA; + + text-align: left; + margin-left: 0; + width: 50%; +} + +div.sphinxsidebar .badge { + border-bottom: none; +} + +div.sphinxsidebar .badge:hover { + border-bottom: none; +} + +/* To address an issue with donation coming after search */ +div.sphinxsidebar h3.donation { + margin-top: 10px; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: Georgia, serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #DDD; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #EAEAEA; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + margin: 20px 0px; + padding: 10px 30px; + background-color: #EEE; + border: 1px solid #CCC; +} + +div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fafafa; +} + +div.admonition p.admonition-title { + font-family: Georgia, serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.warning { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.danger { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.error { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.caution { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.attention { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.important { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.note { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.tip { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.hint { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.seealso { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.topic { + background-color: #EEE; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt, code { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +.hll { + background-color: #FFC; + margin: 0 -12px; + padding: 0 12px; + display: block; +} + +img.screenshot { +} + +tt.descname, tt.descclassname, code.descname, code.descclassname { + font-size: 0.95em; +} + +tt.descname, code.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #EEE; + background: #FDFDFD; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.field-list p { + margin-bottom: 0.8em; +} + +/* Cloned from + * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 + */ +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +table.footnote td.label { + width: .1px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin-left: 0; + margin-right: 0; + margin-top: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + /* Matches the 30px from the narrow-screen "li > ul" selector below */ + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: unset; + padding: 7px 30px; + margin: 15px 0px; + line-height: 1.3em; +} + +div.viewcode-block:target { + background: #ffd; +} + +dl pre, blockquote pre, li pre { + margin-left: 0; + padding-left: 30px; +} + +tt, code { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, code.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fff; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +/* Don't put an underline on images */ +a.image-reference, a.image-reference:hover { + border-bottom: none; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt, a:hover code { + background: #EEE; +} + +@media screen and (max-width: 940px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: #fff; + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.sphinxsidebar { + display: block; + float: none; + width: unset; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: #FFF; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: #fff; + } + + div.sphinxsidebar a { + color: #AAA; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + min-width: auto; /* fixes width on small screens, breaks .hll */ + padding: 0; + } + + .hll { + /* "fixes" the breakage */ + width: max-content; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } +} + + +/* misc. */ + +.revsys-inline { + display: none!important; +} + +/* Hide ugly table cell borders in ..bibliography:: directive output */ +table.docutils.citation, table.docutils.citation td, table.docutils.citation th { + border: none; + /* Below needed in some edge cases; if not applied, bottom shadows appear */ + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + + +/* relbar */ + +.related { + line-height: 30px; + width: 100%; + font-size: 0.9rem; +} + +.related.top { + border-bottom: 1px solid #EEE; + margin-bottom: 20px; +} + +.related.bottom { + border-top: 1px solid #EEE; +} + +.related ul { + padding: 0; + margin: 0; + list-style: none; +} + +.related li { + display: inline; +} + +nav#rellinks { + float: right; +} + +nav#rellinks li+li:before { + content: "|"; +} + +nav#breadcrumbs li+li:before { + content: "\00BB"; +} + +/* Hide certain items when printing */ +@media print { + div.related { + display: none; + } +} + +img.github { + position: absolute; + top: 0; + border: 0; + right: 0; +} \ No newline at end of file diff --git a/docs/_build/html/_static/custom.css b/docs/_build/html/_static/custom.css new file mode 100644 index 0000000..2a924f1 --- /dev/null +++ b/docs/_build/html/_static/custom.css @@ -0,0 +1 @@ +/* This file intentionally left blank. */ diff --git a/docs/_build/html/_static/documentation_options.js b/docs/_build/html/_static/documentation_options.js index df3cc2b..b16db03 100644 --- a/docs/_build/html/_static/documentation_options.js +++ b/docs/_build/html/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '0.1.1', + VERSION: '0.2.0', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', @@ -10,4 +10,4 @@ const DOCUMENTATION_OPTIONS = { NAVIGATION_WITH_KEYS: false, SHOW_SEARCH_SUMMARY: true, ENABLE_SEARCH_SHORTCUTS: true, -}; +}; \ No newline at end of file diff --git a/docs/_build/html/_static/github-banner.svg b/docs/_build/html/_static/github-banner.svg new file mode 100644 index 0000000..c47d9dc --- /dev/null +++ b/docs/_build/html/_static/github-banner.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/_build/html/_static/language_data.js b/docs/_build/html/_static/language_data.js index a5ea78e..c7fe6c6 100644 --- a/docs/_build/html/_static/language_data.js +++ b/docs/_build/html/_static/language_data.js @@ -189,3 +189,4 @@ var Stemmer = function() { return w; } } + diff --git a/docs/_build/html/_static/pygments.css b/docs/_build/html/_static/pygments.css index 4cf48d0..348ec44 100644 --- a/docs/_build/html/_static/pygments.css +++ b/docs/_build/html/_static/pygments.css @@ -1,250 +1,7 @@ -.highlight pre { line-height: 125%; } -.highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -.highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -.highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -.highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -.highlight .hll { background-color: #fdf2e2 } -.highlight { background: #f2f2f2; color: #1E1E1E } -.highlight .c { color: #515151 } /* Comment */ -.highlight .err { color: #D71835 } /* Error */ -.highlight .k { color: #8045E5 } /* Keyword */ -.highlight .l { color: #7F4707 } /* Literal */ -.highlight .n { color: #1E1E1E } /* Name */ -.highlight .o { color: #163 } /* Operator */ -.highlight .p { color: #1E1E1E } /* Punctuation */ -.highlight .ch { color: #515151 } /* Comment.Hashbang */ -.highlight .cm { color: #515151 } /* Comment.Multiline */ -.highlight .cp { color: #515151 } /* Comment.Preproc */ -.highlight .cpf { color: #515151 } /* Comment.PreprocFile */ -.highlight .c1 { color: #515151 } /* Comment.Single */ -.highlight .cs { color: #515151 } /* Comment.Special */ -.highlight .gd { color: #00749C } /* Generic.Deleted */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gh { color: #00749C } /* Generic.Heading */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #00749C } /* Generic.Subheading */ -.highlight .kc { color: #8045E5 } /* Keyword.Constant */ -.highlight .kd { color: #8045E5 } /* Keyword.Declaration */ -.highlight .kn { color: #8045E5 } /* Keyword.Namespace */ -.highlight .kp { color: #8045E5 } /* Keyword.Pseudo */ -.highlight .kr { color: #8045E5 } /* Keyword.Reserved */ -.highlight .kt { color: #7F4707 } /* Keyword.Type */ -.highlight .ld { color: #7F4707 } /* Literal.Date */ -.highlight .m { color: #7F4707 } /* Literal.Number */ -.highlight .s { color: #163 } /* Literal.String */ -.highlight .na { color: #7F4707 } /* Name.Attribute */ -.highlight .nb { color: #7F4707 } /* Name.Builtin */ -.highlight .nc { color: #00749C } /* Name.Class */ -.highlight .no { color: #00749C } /* Name.Constant */ -.highlight .nd { color: #7F4707 } /* Name.Decorator */ -.highlight .ni { color: #163 } /* Name.Entity */ -.highlight .ne { color: #8045E5 } /* Name.Exception */ -.highlight .nf { color: #00749C } /* Name.Function */ -.highlight .nl { color: #7F4707 } /* Name.Label */ -.highlight .nn { color: #1E1E1E } /* Name.Namespace */ -.highlight .nx { color: #1E1E1E } /* Name.Other */ -.highlight .py { color: #00749C } /* Name.Property */ -.highlight .nt { color: #00749C } /* Name.Tag */ -.highlight .nv { color: #D71835 } /* Name.Variable */ -.highlight .ow { color: #8045E5 } /* Operator.Word */ -.highlight .pm { color: #1E1E1E } /* Punctuation.Marker */ -.highlight .w { color: #1E1E1E } /* Text.Whitespace */ -.highlight .mb { color: #7F4707 } /* Literal.Number.Bin */ -.highlight .mf { color: #7F4707 } /* Literal.Number.Float */ -.highlight .mh { color: #7F4707 } /* Literal.Number.Hex */ -.highlight .mi { color: #7F4707 } /* Literal.Number.Integer */ -.highlight .mo { color: #7F4707 } /* Literal.Number.Oct */ -.highlight .sa { color: #163 } /* Literal.String.Affix */ -.highlight .sb { color: #163 } /* Literal.String.Backtick */ -.highlight .sc { color: #163 } /* Literal.String.Char */ -.highlight .dl { color: #163 } /* Literal.String.Delimiter */ -.highlight .sd { color: #163 } /* Literal.String.Doc */ -.highlight .s2 { color: #163 } /* Literal.String.Double */ -.highlight .se { color: #163 } /* Literal.String.Escape */ -.highlight .sh { color: #163 } /* Literal.String.Heredoc */ -.highlight .si { color: #163 } /* Literal.String.Interpol */ -.highlight .sx { color: #163 } /* Literal.String.Other */ -.highlight .sr { color: #D71835 } /* Literal.String.Regex */ -.highlight .s1 { color: #163 } /* Literal.String.Single */ -.highlight .ss { color: #00749C } /* Literal.String.Symbol */ -.highlight .bp { color: #7F4707 } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #00749C } /* Name.Function.Magic */ -.highlight .vc { color: #D71835 } /* Name.Variable.Class */ -.highlight .vg { color: #D71835 } /* Name.Variable.Global */ -.highlight .vi { color: #D71835 } /* Name.Variable.Instance */ -.highlight .vm { color: #7F4707 } /* Name.Variable.Magic */ -.highlight .il { color: #7F4707 } /* Literal.Number.Integer.Long */ -@media not print { -body[data-theme="dark"] .highlight pre { line-height: 125%; } -body[data-theme="dark"] .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } -body[data-theme="dark"] .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } -body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -body[data-theme="dark"] .highlight .hll { background-color: #404040 } -body[data-theme="dark"] .highlight { background: #202020; color: #D0D0D0 } -body[data-theme="dark"] .highlight .c { color: #ABABAB; font-style: italic } /* Comment */ -body[data-theme="dark"] .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */ -body[data-theme="dark"] .highlight .esc { color: #D0D0D0 } /* Escape */ -body[data-theme="dark"] .highlight .g { color: #D0D0D0 } /* Generic */ -body[data-theme="dark"] .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */ -body[data-theme="dark"] .highlight .l { color: #D0D0D0 } /* Literal */ -body[data-theme="dark"] .highlight .n { color: #D0D0D0 } /* Name */ -body[data-theme="dark"] .highlight .o { color: #D0D0D0 } /* Operator */ -body[data-theme="dark"] .highlight .x { color: #D0D0D0 } /* Other */ -body[data-theme="dark"] .highlight .p { color: #D0D0D0 } /* Punctuation */ -body[data-theme="dark"] .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */ -body[data-theme="dark"] .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */ -body[data-theme="dark"] .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */ -body[data-theme="dark"] .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */ -body[data-theme="dark"] .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */ -body[data-theme="dark"] .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #FF3A3A } /* Generic.Deleted */ -body[data-theme="dark"] .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */ -body[data-theme="dark"] .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #FF3A3A } /* Generic.Error */ -body[data-theme="dark"] .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */ -body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ -body[data-theme="dark"] .highlight .go { color: #CCC } /* Generic.Output */ -body[data-theme="dark"] .highlight .gp { color: #AAA } /* Generic.Prompt */ -body[data-theme="dark"] .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */ -body[data-theme="dark"] .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #FF3A3A } /* Generic.Traceback */ -body[data-theme="dark"] .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */ -body[data-theme="dark"] .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */ -body[data-theme="dark"] .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */ -body[data-theme="dark"] .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */ -body[data-theme="dark"] .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */ -body[data-theme="dark"] .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */ -body[data-theme="dark"] .highlight .ld { color: #D0D0D0 } /* Literal.Date */ -body[data-theme="dark"] .highlight .m { color: #51B2FD } /* Literal.Number */ -body[data-theme="dark"] .highlight .s { color: #ED9D13 } /* Literal.String */ -body[data-theme="dark"] .highlight .na { color: #BBB } /* Name.Attribute */ -body[data-theme="dark"] .highlight .nb { color: #2FBCCD } /* Name.Builtin */ -body[data-theme="dark"] .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */ -body[data-theme="dark"] .highlight .no { color: #40FFFF } /* Name.Constant */ -body[data-theme="dark"] .highlight .nd { color: #FFA500 } /* Name.Decorator */ -body[data-theme="dark"] .highlight .ni { color: #D0D0D0 } /* Name.Entity */ -body[data-theme="dark"] .highlight .ne { color: #BBB } /* Name.Exception */ -body[data-theme="dark"] .highlight .nf { color: #71ADFF } /* Name.Function */ -body[data-theme="dark"] .highlight .nl { color: #D0D0D0 } /* Name.Label */ -body[data-theme="dark"] .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */ -body[data-theme="dark"] .highlight .nx { color: #D0D0D0 } /* Name.Other */ -body[data-theme="dark"] .highlight .py { color: #D0D0D0 } /* Name.Property */ -body[data-theme="dark"] .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */ -body[data-theme="dark"] .highlight .nv { color: #40FFFF } /* Name.Variable */ -body[data-theme="dark"] .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */ -body[data-theme="dark"] .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */ -body[data-theme="dark"] .highlight .w { color: #666 } /* Text.Whitespace */ -body[data-theme="dark"] .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */ -body[data-theme="dark"] .highlight .mf { color: #51B2FD } /* Literal.Number.Float */ -body[data-theme="dark"] .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */ -body[data-theme="dark"] .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */ -body[data-theme="dark"] .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */ -body[data-theme="dark"] .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */ -body[data-theme="dark"] .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */ -body[data-theme="dark"] .highlight .sc { color: #ED9D13 } /* Literal.String.Char */ -body[data-theme="dark"] .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */ -body[data-theme="dark"] .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */ -body[data-theme="dark"] .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */ -body[data-theme="dark"] .highlight .se { color: #ED9D13 } /* Literal.String.Escape */ -body[data-theme="dark"] .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */ -body[data-theme="dark"] .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */ -body[data-theme="dark"] .highlight .sx { color: #FFA500 } /* Literal.String.Other */ -body[data-theme="dark"] .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */ -body[data-theme="dark"] .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */ -body[data-theme="dark"] .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */ -body[data-theme="dark"] .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */ -body[data-theme="dark"] .highlight .fm { color: #71ADFF } /* Name.Function.Magic */ -body[data-theme="dark"] .highlight .vc { color: #40FFFF } /* Name.Variable.Class */ -body[data-theme="dark"] .highlight .vg { color: #40FFFF } /* Name.Variable.Global */ -body[data-theme="dark"] .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */ -body[data-theme="dark"] .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */ -body[data-theme="dark"] .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */ -@media (prefers-color-scheme: dark) { -body:not([data-theme="light"]) .highlight pre { line-height: 125%; } -body:not([data-theme="light"]) .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } -body:not([data-theme="light"]) .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } -body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -body:not([data-theme="light"]) .highlight .hll { background-color: #404040 } -body:not([data-theme="light"]) .highlight { background: #202020; color: #D0D0D0 } -body:not([data-theme="light"]) .highlight .c { color: #ABABAB; font-style: italic } /* Comment */ -body:not([data-theme="light"]) .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */ -body:not([data-theme="light"]) .highlight .esc { color: #D0D0D0 } /* Escape */ -body:not([data-theme="light"]) .highlight .g { color: #D0D0D0 } /* Generic */ -body:not([data-theme="light"]) .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */ -body:not([data-theme="light"]) .highlight .l { color: #D0D0D0 } /* Literal */ -body:not([data-theme="light"]) .highlight .n { color: #D0D0D0 } /* Name */ -body:not([data-theme="light"]) .highlight .o { color: #D0D0D0 } /* Operator */ -body:not([data-theme="light"]) .highlight .x { color: #D0D0D0 } /* Other */ -body:not([data-theme="light"]) .highlight .p { color: #D0D0D0 } /* Punctuation */ -body:not([data-theme="light"]) .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */ -body:not([data-theme="light"]) .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */ -body:not([data-theme="light"]) .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */ -body:not([data-theme="light"]) .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */ -body:not([data-theme="light"]) .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */ -body:not([data-theme="light"]) .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #FF3A3A } /* Generic.Deleted */ -body:not([data-theme="light"]) .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */ -body:not([data-theme="light"]) .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #FF3A3A } /* Generic.Error */ -body:not([data-theme="light"]) .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */ -body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ -body:not([data-theme="light"]) .highlight .go { color: #CCC } /* Generic.Output */ -body:not([data-theme="light"]) .highlight .gp { color: #AAA } /* Generic.Prompt */ -body:not([data-theme="light"]) .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */ -body:not([data-theme="light"]) .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #FF3A3A } /* Generic.Traceback */ -body:not([data-theme="light"]) .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */ -body:not([data-theme="light"]) .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */ -body:not([data-theme="light"]) .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */ -body:not([data-theme="light"]) .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */ -body:not([data-theme="light"]) .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */ -body:not([data-theme="light"]) .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */ -body:not([data-theme="light"]) .highlight .ld { color: #D0D0D0 } /* Literal.Date */ -body:not([data-theme="light"]) .highlight .m { color: #51B2FD } /* Literal.Number */ -body:not([data-theme="light"]) .highlight .s { color: #ED9D13 } /* Literal.String */ -body:not([data-theme="light"]) .highlight .na { color: #BBB } /* Name.Attribute */ -body:not([data-theme="light"]) .highlight .nb { color: #2FBCCD } /* Name.Builtin */ -body:not([data-theme="light"]) .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */ -body:not([data-theme="light"]) .highlight .no { color: #40FFFF } /* Name.Constant */ -body:not([data-theme="light"]) .highlight .nd { color: #FFA500 } /* Name.Decorator */ -body:not([data-theme="light"]) .highlight .ni { color: #D0D0D0 } /* Name.Entity */ -body:not([data-theme="light"]) .highlight .ne { color: #BBB } /* Name.Exception */ -body:not([data-theme="light"]) .highlight .nf { color: #71ADFF } /* Name.Function */ -body:not([data-theme="light"]) .highlight .nl { color: #D0D0D0 } /* Name.Label */ -body:not([data-theme="light"]) .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */ -body:not([data-theme="light"]) .highlight .nx { color: #D0D0D0 } /* Name.Other */ -body:not([data-theme="light"]) .highlight .py { color: #D0D0D0 } /* Name.Property */ -body:not([data-theme="light"]) .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */ -body:not([data-theme="light"]) .highlight .nv { color: #40FFFF } /* Name.Variable */ -body:not([data-theme="light"]) .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */ -body:not([data-theme="light"]) .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */ -body:not([data-theme="light"]) .highlight .w { color: #666 } /* Text.Whitespace */ -body:not([data-theme="light"]) .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */ -body:not([data-theme="light"]) .highlight .mf { color: #51B2FD } /* Literal.Number.Float */ -body:not([data-theme="light"]) .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */ -body:not([data-theme="light"]) .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */ -body:not([data-theme="light"]) .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */ -body:not([data-theme="light"]) .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */ -body:not([data-theme="light"]) .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */ -body:not([data-theme="light"]) .highlight .sc { color: #ED9D13 } /* Literal.String.Char */ -body:not([data-theme="light"]) .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */ -body:not([data-theme="light"]) .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */ -body:not([data-theme="light"]) .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */ -body:not([data-theme="light"]) .highlight .se { color: #ED9D13 } /* Literal.String.Escape */ -body:not([data-theme="light"]) .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */ -body:not([data-theme="light"]) .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */ -body:not([data-theme="light"]) .highlight .sx { color: #FFA500 } /* Literal.String.Other */ -body:not([data-theme="light"]) .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */ -body:not([data-theme="light"]) .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */ -body:not([data-theme="light"]) .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */ -body:not([data-theme="light"]) .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */ -body:not([data-theme="light"]) .highlight .fm { color: #71ADFF } /* Name.Function.Magic */ -body:not([data-theme="light"]) .highlight .vc { color: #40FFFF } /* Name.Variable.Class */ -body:not([data-theme="light"]) .highlight .vg { color: #40FFFF } /* Name.Variable.Global */ -body:not([data-theme="light"]) .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */ -body:not([data-theme="light"]) .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */ -body:not([data-theme="light"]) .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */ -} -} +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } \ No newline at end of file diff --git a/docs/_build/html/_static/scripts/front_page.js b/docs/_build/html/_static/scripts/front_page.js new file mode 100644 index 0000000..03fd423 --- /dev/null +++ b/docs/_build/html/_static/scripts/front_page.js @@ -0,0 +1,50 @@ +// === LLMSQL Front Page Search Script === + +const searchInput = document.querySelector('.sidebar-search'); +let highlights = []; +let currentIndex = 0; + +function removeHighlights() { + document.querySelectorAll('.search-highlight').forEach(span => { + const parent = span.parentNode; + parent.replaceChild(document.createTextNode(span.textContent), span); + parent.normalize(); + }); + highlights = []; +} + +function highlightMatches(query) { + if (!query) return; + const contentElements = document.querySelectorAll('main p, main li, main td, main pre, main h1, main h2, main h3'); + const regex = new RegExp(`(${query})`, 'gi'); + contentElements.forEach(el => { + el.innerHTML = el.textContent.replace(regex, '$1'); + }); + highlights = [...document.querySelectorAll('.search-highlight')]; +} + +function scrollToHighlight(index) { + if (highlights.length === 0) return; + highlights.forEach(h => h.style.background = '#fff89a'); + const el = highlights[index]; + el.style.background = '#ffe666'; + el.scrollIntoView({ behavior: 'smooth', block: 'center' }); +} + +if (searchInput) { + searchInput.addEventListener('input', e => { + removeHighlights(); + const query = e.target.value.trim(); + if (query) highlightMatches(query); + }); + + searchInput.addEventListener('keydown', e => { + if (e.key === 'Enter') { + e.preventDefault(); + if (highlights.length > 0) { + scrollToHighlight(currentIndex); + currentIndex = (currentIndex + 1) % highlights.length; + } + } + }); +} diff --git a/docs/_build/html/_static/styles/basic.css b/docs/_build/html/_static/styles/basic.css new file mode 100644 index 0000000..9c0c9b8 --- /dev/null +++ b/docs/_build/html/_static/styles/basic.css @@ -0,0 +1,906 @@ +/* + * Sphinx stylesheet -- basic theme. + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin-top: 10px; +} + +ul.search li { + padding: 5px 0; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} diff --git a/docs/_build/html/_static/styles/front_page.css b/docs/_build/html/_static/styles/front_page.css new file mode 100644 index 0000000..9aa818e --- /dev/null +++ b/docs/_build/html/_static/styles/front_page.css @@ -0,0 +1,215 @@ +/* === LLMSQL Front Page CSS === */ + +.sidebar { + position: fixed; + top: 16px; + left: 16px; + height: auto; + width: 160px; + background-color: #f4f4f4; + border: 1px solid #e0e0e0; + border-radius: 8px; + padding: 12px; + display: flex; + align-items: center; + justify-content: center; + z-index: 110; + box-shadow: 0 2px 6px rgba(0,0,0,0.04); +} + +.sidebar-content { + display: flex; + flex-direction: column; + align-items: center; + gap: 10px; + width: 100%; +} + +.sidebar-button { + display: block; + text-align: center; + background-color: #eef6ff; + color: #0056b3; + padding: 10px; + border-radius: 6px; + text-decoration: none; + font-weight: 600; + transition: background-color 0.2s, color 0.2s; +} +.sidebar-button:hover { + background-color: #007bff; + color: white; +} + +.sidebar-search { + width: 100%; + padding: 8px 10px; + border-radius: 6px; + border: 1px solid #ccc; + font-size: 0.9rem; + box-sizing: border-box; + transition: border-color 0.2s ease, box-shadow 0.2s ease; +} + +.search-highlight { + background-color: #fff89a; + border-radius: 3px; + padding: 0 2px; +} + +.sidebar-search:focus { + outline: none; + border-color: #007bff; + box-shadow: 0 0 6px rgba(0, 123, 255, 0.3); +} + +.on-this-page { + position: fixed; + top: 16px; + right: 16px; + width: 220px; + background: #fafafa; + border: 1px solid #eee; + border-radius: 8px; + padding: 12px; + font-size: 0.95rem; + z-index: 105; + box-shadow: 0 2px 6px rgba(0,0,0,0.04); +} +.on-this-page h4 { + margin: 0 0 8px 0; + padding-bottom: 6px; + border-bottom: 1px solid #e9e9e9; + font-size: 0.95rem; +} +.on-this-page ul { + list-style: none; + padding: 0; + margin: 8px 0 0 0; +} +.on-this-page ul li { + margin-bottom: 6px; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + line-height: 1.6; + margin: 0 auto; + padding: 28px 36px; + color: #333; + background-color: #fff; + max-width: 1100px; +} + +.center-content { + text-align: center; + margin-bottom: 18px; +} +h1 { + margin: 0 0 10px 0; + font-size: 1.9rem; + color: #0056b3; + border-bottom: 3px solid #e9f1ff; + padding-bottom: 8px; +} + +.badges { + margin-top: 10px; + display: inline-flex; + gap: 8px; + align-items: center; + justify-content: center; + flex-wrap: wrap; +} +.badges img { + height: 20px; + display: inline-block; +} + +h2 { + color: #007bff; + border-bottom: 1px solid #eee; + padding-bottom: 6px; + margin-top: 28px; +} + +table { + width: 100%; + border-collapse: collapse; + margin-bottom: 18px; +} +th, td { + border: 1px solid #ddd; + padding: 10px; + text-align: left; +} +th { + background: #f6f6f6; +} + +pre { + background-color: #2d2d2d; + color: #ccc; + padding: 12px; + border-radius: 6px; + overflow-x: auto; + white-space: pre-wrap; + margin: 10px 0; +} + +code { + background-color: #f4f4f4; + padding: 2px 6px; + border-radius: 4px; + font-size: 0.95em; + color: #c94a4a; +} + +.note-box { + background-color: #eef5ff; + padding: 12px; + border-left: 4px solid #007bff; + margin: 12px 0; + border-radius: 6px; +} + +.custom-highlight-box { + border-left: 5px solid #ffc107; + background-color: #fff8e1; + padding: 12px; + border-radius: 6px; + margin-bottom: 14px; +} + +.center-content.small { + font-size: 0.92rem; + color: #666; + margin-top: 26px; +} + +/* Responsive */ +@media (max-width: 1000px) { + .on-this-page { position: static; width: auto; margin: 12px 0 18px; } +} + +@media (max-width: 720px) { + .sidebar, .on-this-page { display: none; } + h1 { font-size: 1.5rem; } + .badges img { height: 18px; } +} + +pre, code { + background: #2d2d2d !important; + color: #eee !important; + border-radius: 6px; +} + +pre { + padding: 12px !important; + overflow-x: auto; +} + +pre span { + background: none !important; + color: inherit !important; +} diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html index 1d9b90c..218b8d9 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/html/genindex.html @@ -1,264 +1,77 @@ - - - - - - - Index - LLMSQL 0.1.1 documentation - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- + + + + + + + Index — LLMSQL 0.2.0 documentation + + + + + + + + + + + -
- -
-
-
- - - - - Back to top - -
-
- +
-
-
- -
-

Index

-
-
- -
-
- - -
-
- - Made with Sphinx and @pradyunsg's - - Furo - -
-
- -
+
+
+
- -
- - - - - + + + diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index 8293eb7..5337eb5 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -1,319 +1,162 @@ - - - - - - + + + + + + LLMSQL Project β€” Text-to-SQL Benchmark - - LLMSQL 0.1.1 documentation - - - + + + - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- + +
- -
-
-
- - - - - Back to top - -
- -
- -
- -
- -
-
- - -
-
- - Made with Sphinx and @pradyunsg's +

πŸ’‘ Description

+

LLMSQL Benchmark is an open-source framework providing a modernized, cleaned, and extended version of the original WikiSQL dataset, specifically designed for evaluating and fine-tuning Large Language Models (LLMs) on Text-to-SQL tasks.

- Furo +

Key improvements

+
    +
  • Data Cleaning: Fixed errors (type mismatches, case sensitivity) causing 41% empty results.
  • +
  • LLM-Ready Format: Replaced numeric placeholders with standard SQL, improving training consistency.
  • +
-
-
+

πŸ“š Documentation

+
+

Note: Documentation pages (installation guide, API reference) are under construction.
See Quick Start below or the README files inside the repo.

+
-
-
+

⚑ Quick Start

+
+

⚠️ WARNING β€” Reproducibility

+ +

+ vLLM and HuggingFace Transformers may produce different results even with the same + settings (e.g., temperature=0). This is due to differences in implementation, computation precision, + and batching mechanisms. +

+ +

Recommendation: when comparing model quality, use the same backend + (either only vLLM or only Transformers).

+ +

Sources:
+ β€’ vLLM FAQ: + FAQ
+ β€’ Model Support Policy: + + Supported Models + +

+
-
+

1️⃣ Installation

+

Install the base package:

+
pip install llmsql
+ +

To enable the vLLM backend:

+
pip install llmsql[vllm]
+ +

2️⃣ Inference from CLI

+ +

vLLM Backend (Recommended)

+
llmsql inference --method vllm \
+--model-name Qwen/Qwen2.5-1.5B-Instruct \
+--output-file outputs/preds.jsonl \
+--batch-size 8 \
+--num_fewshots 5 \
+--temperature 0.0
+ +

Transformers Backend

+
llmsql inference --method transformers \
+--model-or-model-name-or-path Qwen/Qwen2.5-1.5B-Instruct \
+--output-file outputs/preds.jsonl \
+--batch-size 8 \
+--temperature 0.9 \
+--generate-kwargs '{"do_sample": false, "top_p": 0.95}'
+ +

3️⃣ Evaluation API (Python)

+
from llmsql import LLMSQLEvaluator
+
+evaluator = LLMSQLEvaluator(workdir_path="llmsql_workdir")
+report = evaluator.evaluate(outputs_path="path_to_your_outputs.jsonl")
+print(report)
+
+ + + + + + + + + +
ResourceDetails
πŸ“¦ PyPI Projectllmsql on PyPI
πŸ’Ύ Dataset on Hugging Facellmsql-bench dataset
πŸ’» Source CodeGitHub repo
+ +

πŸ“Š Leaderboard [in progress]

+
+

+ The official Leaderboard is currently empty and in progress. + + Submit + + your model results to be the first on the ranking! +

- -
-
- - - - + diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv index 9a4fc83..1e1892b 100644 Binary files a/docs/_build/html/objects.inv and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index 698b467..63fe541 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -1,275 +1,94 @@ - - - - - - - - - -Search - LLMSQL 0.1.1 documentation - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + -Skip to content - - - -
-
-
- -
- -
-
- -
- + + + + + Search — LLMSQL 0.2.0 documentation + + + + + + + + + + + + + + + + + + -
- -
-
-
- - - - - Back to top - -
-
- -
- -
-
- - -
-
-
-
+

+ Searching for multiple words only shows matches that contain + all words. +

- -
-
- - Made with Sphinx and @pradyunsg's - Furo +
-
-
+
- -
+
+ +
- -
-
- - - - - - - + + + diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index 3d0446b..87df9f1 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"Welcome to LLMSQL project": [[0, null]], "\ud83d\udce6 Installation": [[0, "installation"]], "\ud83d\udd17 Resources": [[0, "resources"]], "\ud83d\ude80 Features": [[0, "features"]]}, "docnames": ["index"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["index.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"code": 0, "dataset": 0, "easi": 0, "evalu": 0, "exampl": 0, "face": 0, "github": 0, "hug": 0, "huggingfac": 0, "i": 0, "infer": 0, "integr": 0, "llm": 0, "packag": 0, "pip3": 0, "pypi": 0, "python": 0, "reason": 0, "sourc": 0, "sql": 0, "support": 0, "trl": 0, "usag": 0, "util": 0, "vllm": 0}, "titles": ["Welcome to LLMSQL project"], "titleterms": {"featur": 0, "instal": 0, "llmsql": 0, "project": 0, "resourc": 0, "welcom": 0}}) +Search.setIndex({"alltitles": {}, "docnames": ["index"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["index.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {}, "titles": ["<no title>"], "titleterms": {}}) diff --git a/docs/_build/index.html b/docs/_build/index.html deleted file mode 100644 index 616bfda..0000000 --- a/docs/_build/index.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - LLMSQL 0.1.1 documentation - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
- -
-
- - -
-
- - Made with Sphinx and @pradyunsg's - - Furo - -
-
- -
-
- -
-
- -
-
- - - - - diff --git a/docs/_static/scripts/front_page.js b/docs/_static/scripts/front_page.js new file mode 100644 index 0000000..03fd423 --- /dev/null +++ b/docs/_static/scripts/front_page.js @@ -0,0 +1,50 @@ +// === LLMSQL Front Page Search Script === + +const searchInput = document.querySelector('.sidebar-search'); +let highlights = []; +let currentIndex = 0; + +function removeHighlights() { + document.querySelectorAll('.search-highlight').forEach(span => { + const parent = span.parentNode; + parent.replaceChild(document.createTextNode(span.textContent), span); + parent.normalize(); + }); + highlights = []; +} + +function highlightMatches(query) { + if (!query) return; + const contentElements = document.querySelectorAll('main p, main li, main td, main pre, main h1, main h2, main h3'); + const regex = new RegExp(`(${query})`, 'gi'); + contentElements.forEach(el => { + el.innerHTML = el.textContent.replace(regex, '$1'); + }); + highlights = [...document.querySelectorAll('.search-highlight')]; +} + +function scrollToHighlight(index) { + if (highlights.length === 0) return; + highlights.forEach(h => h.style.background = '#fff89a'); + const el = highlights[index]; + el.style.background = '#ffe666'; + el.scrollIntoView({ behavior: 'smooth', block: 'center' }); +} + +if (searchInput) { + searchInput.addEventListener('input', e => { + removeHighlights(); + const query = e.target.value.trim(); + if (query) highlightMatches(query); + }); + + searchInput.addEventListener('keydown', e => { + if (e.key === 'Enter') { + e.preventDefault(); + if (highlights.length > 0) { + scrollToHighlight(currentIndex); + currentIndex = (currentIndex + 1) % highlights.length; + } + } + }); +} diff --git a/docs/_static/styles/front_page.css b/docs/_static/styles/front_page.css new file mode 100644 index 0000000..9aa818e --- /dev/null +++ b/docs/_static/styles/front_page.css @@ -0,0 +1,215 @@ +/* === LLMSQL Front Page CSS === */ + +.sidebar { + position: fixed; + top: 16px; + left: 16px; + height: auto; + width: 160px; + background-color: #f4f4f4; + border: 1px solid #e0e0e0; + border-radius: 8px; + padding: 12px; + display: flex; + align-items: center; + justify-content: center; + z-index: 110; + box-shadow: 0 2px 6px rgba(0,0,0,0.04); +} + +.sidebar-content { + display: flex; + flex-direction: column; + align-items: center; + gap: 10px; + width: 100%; +} + +.sidebar-button { + display: block; + text-align: center; + background-color: #eef6ff; + color: #0056b3; + padding: 10px; + border-radius: 6px; + text-decoration: none; + font-weight: 600; + transition: background-color 0.2s, color 0.2s; +} +.sidebar-button:hover { + background-color: #007bff; + color: white; +} + +.sidebar-search { + width: 100%; + padding: 8px 10px; + border-radius: 6px; + border: 1px solid #ccc; + font-size: 0.9rem; + box-sizing: border-box; + transition: border-color 0.2s ease, box-shadow 0.2s ease; +} + +.search-highlight { + background-color: #fff89a; + border-radius: 3px; + padding: 0 2px; +} + +.sidebar-search:focus { + outline: none; + border-color: #007bff; + box-shadow: 0 0 6px rgba(0, 123, 255, 0.3); +} + +.on-this-page { + position: fixed; + top: 16px; + right: 16px; + width: 220px; + background: #fafafa; + border: 1px solid #eee; + border-radius: 8px; + padding: 12px; + font-size: 0.95rem; + z-index: 105; + box-shadow: 0 2px 6px rgba(0,0,0,0.04); +} +.on-this-page h4 { + margin: 0 0 8px 0; + padding-bottom: 6px; + border-bottom: 1px solid #e9e9e9; + font-size: 0.95rem; +} +.on-this-page ul { + list-style: none; + padding: 0; + margin: 8px 0 0 0; +} +.on-this-page ul li { + margin-bottom: 6px; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + line-height: 1.6; + margin: 0 auto; + padding: 28px 36px; + color: #333; + background-color: #fff; + max-width: 1100px; +} + +.center-content { + text-align: center; + margin-bottom: 18px; +} +h1 { + margin: 0 0 10px 0; + font-size: 1.9rem; + color: #0056b3; + border-bottom: 3px solid #e9f1ff; + padding-bottom: 8px; +} + +.badges { + margin-top: 10px; + display: inline-flex; + gap: 8px; + align-items: center; + justify-content: center; + flex-wrap: wrap; +} +.badges img { + height: 20px; + display: inline-block; +} + +h2 { + color: #007bff; + border-bottom: 1px solid #eee; + padding-bottom: 6px; + margin-top: 28px; +} + +table { + width: 100%; + border-collapse: collapse; + margin-bottom: 18px; +} +th, td { + border: 1px solid #ddd; + padding: 10px; + text-align: left; +} +th { + background: #f6f6f6; +} + +pre { + background-color: #2d2d2d; + color: #ccc; + padding: 12px; + border-radius: 6px; + overflow-x: auto; + white-space: pre-wrap; + margin: 10px 0; +} + +code { + background-color: #f4f4f4; + padding: 2px 6px; + border-radius: 4px; + font-size: 0.95em; + color: #c94a4a; +} + +.note-box { + background-color: #eef5ff; + padding: 12px; + border-left: 4px solid #007bff; + margin: 12px 0; + border-radius: 6px; +} + +.custom-highlight-box { + border-left: 5px solid #ffc107; + background-color: #fff8e1; + padding: 12px; + border-radius: 6px; + margin-bottom: 14px; +} + +.center-content.small { + font-size: 0.92rem; + color: #666; + margin-top: 26px; +} + +/* Responsive */ +@media (max-width: 1000px) { + .on-this-page { position: static; width: auto; margin: 12px 0 18px; } +} + +@media (max-width: 720px) { + .sidebar, .on-this-page { display: none; } + h1 { font-size: 1.5rem; } + .badges img { height: 18px; } +} + +pre, code { + background: #2d2d2d !important; + color: #eee !important; + border-radius: 6px; +} + +pre { + padding: 12px !important; + overflow-x: auto; +} + +pre span { + background: none !important; + color: inherit !important; +} diff --git a/docs/_templates/index.html b/docs/_templates/index.html new file mode 100644 index 0000000..c431b8f --- /dev/null +++ b/docs/_templates/index.html @@ -0,0 +1,162 @@ + + + + + + LLMSQL Project β€” Text-to-SQL Benchmark + + + + + + + + + + + + + + +
+
+

Welcome to LLMSQL Project

+ + + +

LLMSQL is a Python package for SQL reasoning with LLMs and vLLM inference.

+
+ +

πŸ’‘ Description

+

LLMSQL Benchmark is an open-source framework providing a modernized, cleaned, and extended version of the original WikiSQL dataset, specifically designed for evaluating and fine-tuning Large Language Models (LLMs) on Text-to-SQL tasks.

+ +

Key improvements

+
    +
  • Data Cleaning: Fixed errors (type mismatches, case sensitivity) causing 41% empty results.
  • +
  • LLM-Ready Format: Replaced numeric placeholders with standard SQL, improving training consistency.
  • +
+ +

πŸ“š Documentation

+
+

Note: Documentation pages (installation guide, API reference) are under construction.
See Quick Start below or the README files inside the repo.

+
+ +

⚑ Quick Start

+
+

⚠️ WARNING β€” Reproducibility

+ +

+ vLLM and HuggingFace Transformers may produce different results even with the same + settings (e.g., temperature=0). This is due to differences in implementation, computation precision, + and batching mechanisms. +

+ +

Recommendation: when comparing model quality, use the same backend + (either only vLLM or only Transformers).

+ +

Sources:
+ β€’ vLLM FAQ: + FAQ
+ β€’ Model Support Policy: + + Supported Models + +

+
+ +

1️⃣ Installation

+

Install the base package:

+
pip install llmsql
+ +

To enable the vLLM backend:

+
pip install llmsql[vllm]
+ +

2️⃣ Inference from CLI

+ +

vLLM Backend (Recommended)

+
llmsql inference --method vllm \
+--model-name Qwen/Qwen2.5-1.5B-Instruct \
+--output-file outputs/preds.jsonl \
+--batch-size 8 \
+--num_fewshots 5 \
+--temperature 0.0
+ +

Transformers Backend

+
llmsql inference --method transformers \
+--model-or-model-name-or-path Qwen/Qwen2.5-1.5B-Instruct \
+--output-file outputs/preds.jsonl \
+--batch-size 8 \
+--temperature 0.9 \
+--generate-kwargs '{"do_sample": false, "top_p": 0.95}'
+ +

3️⃣ Evaluation API (Python)

+
from llmsql import LLMSQLEvaluator
+
+evaluator = LLMSQLEvaluator(workdir_path="llmsql_workdir")
+report = evaluator.evaluate(outputs_path="path_to_your_outputs.jsonl")
+print(report)
+
+ + + + + + + + + +
ResourceDetails
πŸ“¦ PyPI Projectllmsql on PyPI
πŸ’Ύ Dataset on Hugging Facellmsql-bench dataset
πŸ’» Source CodeGitHub repo
+ +

πŸ“Š Leaderboard [in progress]

+
+

+ The official Leaderboard is currently empty and in progress. + + Submit + + your model results to be the first on the ranking! +

+
+ + +

πŸ“„ Citation

+
@inproceedings{llmsql_bench,
+  title={LLMSQL: Upgrading WikiSQL for the LLM Era of Text-to-SQL},
+  author={Pihulski, Dzmitry and Charchut, Karol and Novogrodskaia, Viktoria and Koco{'n}, Jan},
+  booktitle={2025 IEEE ICDMW},
+  year={2025},
+  organization={IEEE}
+}
+
+ +
+ πŸ’¬ Made with ❀️ by the LLMSQL Team
+
+
+ + + + + diff --git a/docs/conf.py b/docs/conf.py index 0d7f2a9..93651d8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,33 +1,27 @@ # Configuration file for the Sphinx documentation builder. -# -# For the full list of built-in configuration values, see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = "LLMSQL" copyright = "2025, Dzmitry Pihulski" -author = "Dzmitry Pihulski" -release = "0.1.1" +author = "Viktoria Novogrodskaia" +release = "0.2.0" # -- General configuration --------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [] templates_path = ["_templates"] exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] +html_static_path = ["_static"] -# -- Options for HTML output ------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output +html_theme = "basic" -html_static_path = ["_static"] +html_additional_pages = { + "index": "index.html", +} -extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.napoleon", - "sphinx_autodoc_typehints", -] -html_theme = "furo" +def setup(app): + app.add_css_file("styles/front_page.css") + app.add_js_file("scripts/front_page.js") \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 039e471..b6fc31f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,36 +1 @@ -.. LLMSQL documentation master file, created by - sphinx-quickstart on Wed Sep 24 11:41:44 2025. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to LLMSQL project -========================== - -.. image:: https://img.shields.io/pypi/v/llmsql - :target: https://pypi.org/project/llmsql/ - -LLMSQL is a Python package for SQL reasoning with LLMs and vLLM inference. - -πŸš€ Features ------------ -- Easy vLLM inference integration -- Evaluator utilities -- HuggingFace + TRL support - -πŸ“¦ Installation ---------------- -.. code-block:: bash - - pip3 install llmsql - -πŸ”— Resources ------------- -- `Source code on GitHub `_ -- `PyPI project `_ -- `Dataset on Hugging Face `_ -- `Example Usages `_ - - -.. toctree:: - :maxdepth: 2 - :caption: Contents: +.. This file exists only because Sphinx requires index.rst diff --git a/docs/note.txt b/docs/note.txt new file mode 100644 index 0000000..41aeee7 --- /dev/null +++ b/docs/note.txt @@ -0,0 +1 @@ +To build the docs, use "sphinx-build -b html docs docs/_build/html" from the root folder. diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..0cdf4c1 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx>=7.0 +sphinx-rtd-theme \ No newline at end of file