https://github.com/code-kern-ai/refinery-lf-exec-env
Execution environment for labeling functions in refinery. Containerized function as a service to execute user-defined Python scripts.
https://github.com/code-kern-ai/refinery-lf-exec-env
Last synced: 2 months ago
JSON representation
Execution environment for labeling functions in refinery. Containerized function as a service to execute user-defined Python scripts.
- Host: GitHub
- URL: https://github.com/code-kern-ai/refinery-lf-exec-env
- Owner: code-kern-ai
- License: apache-2.0
- Created: 2022-07-14T13:43:35.000Z (almost 3 years ago)
- Default Branch: dev
- Last Pushed: 2024-12-09T09:53:37.000Z (5 months ago)
- Last Synced: 2025-01-07T21:11:25.599Z (4 months ago)
- Language: Python
- Homepage: https://www.kern.ai
- Size: 88.9 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# refinery-lf-exec-env [](https://drone.dev.kern.ai/code-kern-ai/refinery-lf-exec-env)
[](https://github.com/code-kern-ai/refinery)Execution environment for labeling functions in [refinery](https://github.com/code-kern-ai/refinery). Containerized function as a service to execute user-defined Python scripts.
For classification tasks, the schema is:
```python
from typing import Dict, Anydef my_labeling_function(record: Dict[str: Any]) -> str:
return "my_label"
```For extraction tasks, the schema is:
```python
from typing import Dict, Any, Tupledef my_labeling_function(record: Dict[str: Any]) -> Tuple[str, int, int]:
start_idx = ...
end_idx = ... # excluding format
return "my_label", start_idx, end_idx
```If you like what we're working on, please leave a ⭐ for [refinery](https://github.com/code-kern-ai/refinery)!