Open turian opened 2 weeks ago
I managed to resolve this with:
!pip install scrapingbee langchain_openai "langchain_community<=0.2.16" "langchain_core<=0.2.16"
!pip install 'pydantic==1.10.14'
!pip install json5
However, autolabel main now gives me this error :(
Cell In[5], [line 8](vscode-notebook-cell:?execution_count=5&line=8)
[5](vscode-notebook-cell:?execution_count=5&line=5) model_name = config["model"]["name"]
[7](vscode-notebook-cell:?execution_count=5&line=7) # create an agent for labeling
----> [8](vscode-notebook-cell:?execution_count=5&line=8) agent = LabelingAgent(config=config)
File /opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:117, in LabelingAgent.__init__(self, config, cache, example_selector, label_selector_map, console_output, generation_cache, transform_cache, confidence_cache, confidence_tokenizer, confidence_endpoint, use_tqdm)
[112](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:112) self.use_tqdm = use_tqdm
[114](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:114) self.config = (
[115](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:115) config if isinstance(config, AutolabelConfig) else AutolabelConfig(config)
[116](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:116) )
--> [117](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:117) self.task = TaskFactory.from_config(self.config)
[118](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:118) self.llm: BaseModel = ModelFactory.from_config(
[119](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:119) self.config, cache=self.generation_cache, tokenizer=confidence_tokenizer
[120](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:120) )
[122](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/labeler.py:122) if self.config.confidence_chunk_column():
File /opt/homebrew/lib/python3.11/site-packages/autolabel/tasks/__init__.py:22, in TaskFactory.from_config(config)
[20](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/tasks/__init__.py:20) try:
[21](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/tasks/__init__.py:21) task_type = TaskType(config.task_type())
---> [22](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/tasks/__init__.py:22) task_cls = TASK_TYPE_TO_IMPLEMENTATION[task_type]
[23](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/tasks/__init__.py:23) return task_cls(config)
[24](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/autolabel/tasks/__init__.py:24) except ValueError as _:
KeyError: <TaskType.CLASSIFICATION: 'classification'>
Describe the bug
pyproject.yml
, specificallyjson5
)."pydantic == 1.10.9"
in thepyproject.yml
doesn't supportmodel_validator
(used inautolabel/cache/__init__.py
)."pydantic>=2.8.2"
gives a different error: "A non-annotated attribute was detected".To Reproduce A list of steps to reproduce the behavior:
1.10.9:
gives:
and pydantic 2.9:
gives:
Expected behavior
pyproject.yml
should have a version of pydantic known to work.