Skip to content

Commit

Permalink
Merge branch 'main' into knowledgegraph-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanSara committed May 23, 2023
2 parents b5d40e6 + afc342b commit 030c7eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 6 additions & 5 deletions haystack/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@

from typing import Any, Optional, Dict, List, Union

try:
from typing import Literal
except ImportError:
from typing_extensions import Literal # type: ignore

from pathlib import Path
from uuid import uuid4
import logging
Expand All @@ -18,6 +13,12 @@
import ast
from dataclasses import asdict

# The Literal type from typing_extension is safer to use as
# the one from typing has different bugs in the different versions.
# For more info see typing_extensions official docs:
# https://typing-extensions.readthedocs.io/en/latest/#Literal
from typing_extensions import Literal

import numpy as np
from numpy import ndarray
import pandas as pd
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ classifiers = [
dependencies = [
"requests",
"pydantic",
# FIXME: typing_extensions 4.6.0 broke Pydantic, so we pin it temporarily
# waiting for the release. For more info see this issue:
# https://github.com/pydantic/pydantic/issues/5821
"typing_extensions==4.5.0",
"transformers[torch]==4.29.1",
"protobuf<=3.20.2", # same version they use in transformers[sentencepiece]
"pandas",
Expand Down Expand Up @@ -184,7 +188,6 @@ dev = [
"pre-commit",
# Type check
"mypy",
"typing_extensions; python_version < '3.8'",
# Test
"pytest",
"pytest-cov",
Expand Down

0 comments on commit 030c7eb

Please sign in to comment.