gliner2_classifier / task.json
gilpasternak-cm's picture
Upload task.json with huggingface_hub
5eee547 verified
{
"name": "python_engineering_signals",
"description": "Classify fixed-size Python code blocks for whether they exhibit common OSS-style engineering practices (documentation, typing, structured logging, tests, defensive errors).",
"language": "python",
"conventions": [
{
"name": "has_type_hints",
"description": "Function or method definitions use PEP 484 annotations (parameters and/or return), or module-level variables use explicit type annotations."
},
{
"name": "has_docstring_or_comment_block",
"description": "The block includes a docstring (module, class, or function) or a substantial comment block explaining intent (not only # noqa or trivial one-liners)."
},
{
"name": "uses_logging_not_print",
"description": "Uses the logging module (e.g. logger.info, getLogger) for diagnostic output rather than bare print for operational messages."
},
{
"name": "test_or_pytest_artifacts",
"description": "Test-oriented code: pytest/unittest imports, @pytest.fixture, test_* functions, assert used in a test-like context, or mock/patch from unittest.mock."
},
{
"name": "defensive_error_handling",
"description": "Explicit failure paths: try/except with handling, raise ValueError/TypeError with a message, assert with a message, or guard clauses that raise early."
}
],
"block_lines": 48,
"test_repos": 3,
"train_repos": 8,
"val_repos": 2,
"target_f1": 0.78,
"max_repair_rounds": 3,
"gliner2_base_model": "fastino/gliner2-base-v1",
"gliner2_hf_repo": "gilpasternak-cm/gliner2_classifier"
}