Merged
Conversation
Contributor
mjurbanski-reef
left a comment
There was a problem hiding this comment.
You may want to use https://docs.pydantic.dev/latest/migration/#code-transformation-tool , while it won't solve everything it will be a good starting point.
thewhaleking
requested changes
May 16, 2024
Contributor
|
Getting a number of errors when I run the tests locally. Not sure why. |
Contributor
thewhaleking
left a comment
There was a problem hiding this comment.
Hey Dan, all looks good, but I did run bump-pydantic --diff bittensor/ to check, and I got this:
[19:40:24] Start bump-pydantic. main.py:61
Found 66 files to process. main.py:78
--- bittensor/tensor.py
+++ bittensor/tensor.py
@@ -171,7 +171,7 @@
# Represents the tensor buffer data.
buffer: Optional = Field(
- title="buffer",
+ None, title="buffer",
description="Tensor buffer data. This field stores the serialized representation of the tensor data.",
examples=["0x321e13edqwds231231231232131"],
frozen=True,
[19:41:04] Found 1 errors. Please check the log.txt file.
and the log.txt file shows:
==SUPRESS==
^A syntax error happened on bittensor/utils/__init__.py. This file cannot be formatted.
Check https://github.com/pydantic/bump-pydantic/issues/124 for more information.
Syntax Error @ 1:1.
parser error: error at 1:2: expected one of (, *, +, -, ..., AWAIT, EOF, False, NAME, NUMBER, None, True, [, break, continue, lambda, match, not, pass, ~
Just check into those.
… tensor.py buffer.
Author
|
@thewhaleking I have addressed the Pydantic bump change. |
thewhaleking
approved these changes
May 21, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update Pydantic from V1 to V2. Some of the changes between V1 and V2 have breaking impacts, and our tests will need to be adjusted to reflect those changes.