Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problème de typing dict vs Dict #29

Open
picaultj opened this issue Aug 21, 2023 · 1 comment
Open

Problème de typing dict vs Dict #29

picaultj opened this issue Aug 21, 2023 · 1 comment

Comments

@picaultj
Copy link

Bonjour,

Je rencontre un petit problème.
Lors de l'import de: from vigogne.preprocess import generate_instruct_prompt, l'erreur suivante apparait (Linux, Python 3.8.13):

...
  File "/home/jerome/miniconda2/envs/origami/lib/python3.8/site-packages/vigogne/data_utils.py", line 39, in Conversation
    def fully_model_dump(self, **kwargs) -> dict[str, Any]:
TypeError: 'type' object is not subscriptable

dans data_utils.py, remplacer la ligne 39:
def fully_model_dump(self, **kwargs) -> dict[str, Any]:

avec

def fully_model_dump(self, **kwargs) -> Dict[str, Any]:

et rajout de from typing import Dict permet de résoudre mon problème

Serait-il possible de corriger le code?
Merci! (et bravo pour ce superbe boulot)

@bofenghuang
Copy link
Owner

Bonjour @picaultj, merci d'avoir repéré le problème !

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

No branches or pull requests

2 participants