Skip to content

Feat/experiments#4

Merged
semindan merged 46 commits intodevfrom
feat/experiments
Jan 25, 2026
Merged

Feat/experiments#4
semindan merged 46 commits intodevfrom
feat/experiments

Conversation

@semindan
Copy link
Copy Markdown
Owner

This pull request introduces several major improvements to the span labeling codebase, focusing on extensibility, configuration, dataset handling, error analysis, and development tooling. The most significant changes are the introduction of registry-based extensibility for methods and datasets, the addition of a robust configuration system using Pydantic, enhanced dataset preprocessing, a new error analysis utility, and the setup of linting and pre-commit hooks for code quality.

Core extensibility and architecture:

  • Introduced MethodRegistryMeta and DatasetRegistryMeta metaclasses in span_labeling/base.py to automatically register span labeling methods and datasets, enabling easy extensibility and dynamic lookup. Added MethodRegistry and DatasetRegistry access classes for retrieval and listing.
  • Refactored dataset classes in span_labeling/dataset.py to inherit from DatasetBase (now using registry metaclass), standardized dataset attributes, and improved preprocessing logic for each dataset type. [1] [2]

Configuration and settings:

  • Added span_labeling/config.py with a new configuration system based on Pydantic, supporting environment variables and YAML config loading for model and experiment settings.

Error analysis and utilities:

  • Added span_labeling/error_analysis.py, a utility for analyzing prediction errors and categorizing them (e.g., empty response, invalid labels, truncation, schema errors), including sample usage for batch analysis.

Development tooling and code quality:

  • Added .github/workflows/lint.yaml for GitHub Actions-based linting (ruff, mypy) and .pre-commit-config.yaml for pre-commit hooks to enforce code formatting and static analysis. [1] [2]
  • Updated pyproject.toml to include new dependencies for span labeling, configuration, and development tooling, and defined a dev dependency group.

Other improvements:

  • Added span_labeling/methods/__init__.py to explicitly import and expose available span labeling method modules.

@semindan semindan merged commit f0eef9a into dev Jan 25, 2026
0 of 2 checks passed
@semindan semindan deleted the feat/experiments branch January 25, 2026 21:59
semindan added a commit that referenced this pull request Jan 25, 2026
* Feat/setup (#1)

* add multigec setup

* modify baseline, because I don't have access to llama, I'm banned

* update dependencies

* delete redundant files

* add initial setup with a couple of methods

* Feat/experiments (#2)

* add base method

* ignore data

* add script for generating data

* update dependencies

* delete init script

* add dataset classes

* add script for running experiments

* add methods

* add f1 with overlaps metric

* Feat/experiments (#4)

* add linting

* add pre-commit config

* add linting actions

* add soft version of f1 with overlaps

* change return type to Any

* update deps

* temporarily turn off mypy

* refactor with model_input

* update methods

* delete registry file

* add prompts for each method/dataset

* add prompt utils for assembling prompts

* remove correction notes from multigec prompts

* add script for running a single experiment

* put code into functions

* add scripts for eval and export

* add support for examples in prompts

* increase number of tokens to 8192

* add examples to prompts

* update dependencies

* add script for running an experiment

* add function for checking whether spans overlap

* add async methods

* update deps

* fix prompts

* ignore results and env

* ignore torch cache

* rename create_test_data

* add allowed labels

* refactor methods

* delete old files

* add zero-length matching

* add extra note to prompt builder

* add eval script

* add config

* add constrained processor

* update dependencies

* ignore logs and results

* add constrained method implementation

* update prompts

* add prompt note about enriched indices

* update labels

* add data conversion script

* enhance note extra insertion

* add run scripts

* add wmt old labels fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant