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

Deprecated invalid escape sequences in regexes found in file dspy/dsp/templates /template_v2.py #1123

Closed
dixon1e opened this issue Jun 8, 2024 · 3 comments

Comments

@dixon1e
Copy link

dixon1e commented Jun 8, 2024

The template_v2.py uses escape sequences that require a simple fix to update from deprecated behavior.

On lines 35 and 42, add an 'r' in front of the match string

35: match = re.search("(.)(\s){(.)}\s(.${.})", template)
35: match = re.search(r"(.)(\s){(.)}\s(.${.})", template)

and

42: match = re.search("(.)(\s){(.)}", template)
42: match = re.search(r"(.)(\s){(.)}", template)

This was exposed using the test suite from HybridAGI.

@arnavsinghvi11
Copy link
Collaborator

Feel free to open a PR for this @dixon1e !

@okhat okhat closed this as completed Jun 22, 2024
@okhat
Copy link
Collaborator

okhat commented Jun 22, 2024

Thank you. We will do away with that entire file soon.

@dixon1e
Copy link
Author

dixon1e commented Jun 23, 2024

@arnavsinghvi11 I'll be faster next time and do a PR :)
Thanks for taking care of this so fast!

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

3 participants