Skip to main content

Gil (Python — iyulab-gil)

Gil suggests the judged fields of a form from the documents people have already settled, and chooses — by replaying them in the order they were settled — how far each suggestion can be trusted and how often a trusted one will be right.

This package binds its Rust decision core: replay settled documents to choose how far each layer's suggestions for a form field can be trusted, and get back the decision records the choice rests on.

pip install iyulab-gil
import gil

form = gil.Form.from_dict(
    {
        "name": "ticket",
        "fields": [
            {"name": "product", "role": "observed"},
            {"name": "summary", "role": "observed"},
            {"name": "team", "role": "judged"},
        ],
    }
)
documents = gil.read_records(
    "settled.jsonl"
)  # one JSON object per line, in settlement order
thresholds, records = gil.select_layers(
    form, "team", documents, target_precision=0.8
)
print(thresholds["key"]["chosen"], len(records))

Before choosing thresholds, narrow the fields that key the judged field. A field that happened to settle with one value for a while would otherwise key every later document that shares it:

choice = gil.select_key_fields(form, "team", documents, target_precision=0.8, minimum_answered=30)
definition = {
    "name": "ticket",
    "fields": [
        {"name": "product", "role": "observed"},
        {"name": "summary", "role": "observed"},
        {"name": "team", "role": "judged", "key_fields": choice["key_fields"]},
    ],
}
thresholds, records = gil.select_layers(
    gil.Form.from_dict(definition), "team", documents, target_precision=0.8
)

key_fields is None when no narrower set did better than every field — leave it unset then.

The other settings follow the same pattern — choose, then set on the field: select_key_concentrations (set as key_concentrations, after key_fields) and, for a field with a coarse level ("coarse": {"prefix": 2}), select_coarse once its value thresholds are set.

Status: early. The API may change within 0.x — each change is listed in CHANGELOG.md with what to do about it.

Apache-2.0 — see LICENSE.

Metadata

Release files for iyulab-gil 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iyulab-gil 0.3.0
File Size Uploaded Provenance
iyulab_gil-0.3.0.tar.gz 64.0 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for iyulab-gil 0.3.0
File
iyulab_gil-0.3.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
iyulab_gil-0.3.0-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details
iyulab_gil-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
iyulab_gil-0.3.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
iyulab_gil-0.3.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
iyulab_gil-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 4.2 MB

Release files / iyulab_gil-0.3.0.tar.gz

Download URL iyulab_gil-0.3.0.tar.gz
Size 64.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f397d60d73f16992a4174f184382333cb3420f0ffe62ca33bd55d83f20f97c37
BLAKE2b-256 checksum
How to use checksums
e0833c0079dc18f5f8de38f25ba564059087211204155d8b93853e87f1da19c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / iyulab_gil-0.3.0-cp311-abi3-win_amd64.whl

Download URL iyulab_gil-0.3.0-cp311-abi3-win_amd64.whl
Size 533.6 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d9d119002b74e509d79b70c44fe0efb8120f498583ea1adc974db5639ca0009a
BLAKE2b-256 checksum
How to use checksums
641aa9f128badf0c245faa3f8ad3d5f5008b2023589593f939fed861b85ac6b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / iyulab_gil-0.3.0-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL iyulab_gil-0.3.0-cp311-abi3-musllinux_1_2_x86_64.whl
Size 912.5 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
b2ce7a6a5227a3a7f7f97b0c290b833daeb49e595b0c4fedf98e894677a0feed
BLAKE2b-256 checksum
How to use checksums
8e9cb70f892ac0a5e18975c7a2f9b2883eec7e0afced6dc781592ba2f0ad1c96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / iyulab_gil-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL iyulab_gil-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 704.1 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
a9c2bf21d8f2ff83ce033ce8812a3ff8634588d7bc0b8394ad73ea82643b974c
BLAKE2b-256 checksum
How to use checksums
b8c12295ab634da19765e64ee2f5712efc7471e7f0e7574f7efb86d35ca0509a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / iyulab_gil-0.3.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL iyulab_gil-0.3.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 667.8 kB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
05eb616657373d02bcc8fbfca4697399a2e7d4dd5e5b932d5846d878daf2e395
BLAKE2b-256 checksum
How to use checksums
5271bf6cf5dda26759777480dfa384b3e66fa7043b4f9b684b17a71731227a5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / iyulab_gil-0.3.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL iyulab_gil-0.3.0-cp311-abi3-macosx_11_0_arm64.whl
Size 619.8 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ff11c064c4cb41702dbf87c97118bd093f3904105b90309982b87c1b521fe0a8
BLAKE2b-256 checksum
How to use checksums
73f4f9c847473e3a69309a86c0f7b3a9c361f7f88ab239efa8efb98946b4b2e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / iyulab_gil-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL iyulab_gil-0.3.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 656.0 kB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a126e7c26ac4d1537f56fcfb93dac34d4926e645e68a357b3d886d1c8f3b19b8
BLAKE2b-256 checksum
How to use checksums
588f8e314b9fb9195cf4e5847126f1b2804881ff17d74303186d3cdf10f64eb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for iyulab-gil 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.3.0 This release

7 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page