-
Notifications
You must be signed in to change notification settings - Fork 64
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
Disabled automatic casting to strings #1215
Conversation
Codecov ReportBase: 71.36% // Head: 71.32% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev/1.0.0 #1215 +/- ##
=============================================
- Coverage 71.36% 71.32% -0.04%
=============================================
Files 284 284
Lines 13656 13640 -16
=============================================
- Hits 9745 9729 -16
Misses 3911 3911
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
" `stringify_unsupported(collection)` for collections and dictionaries." | ||
" For details, see https://docs.neptune.ai/setup/neptune-client_1-0_release_changes" | ||
) | ||
elif from_stringify_value: | ||
return StringSeries(values=values) | ||
else: | ||
raise TypeError("Value of unsupported type List[{}]".format(type(sample_val))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@normandy7 after 1.0.0 this will raise TypeError
if anyone will try to assign an unsupported type (including all that were converted to string in 0.x.x
and anything else that were unsupported in prior versions as well). Maybe we would like to improve it anyhow? This also applies to log
and extend
& append
methods and could be specialized to the called method (append
and extend
are combined).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Raalsky Yes, I think we can use a similar message as before. I think it might be best to create a docs page for this error and how to work around it, then we can simply add a link.
Would something like this work?
warn_once(
message="The type of the object you're logging is not supported by"
" Neptune. To log the object as a string, use `str(object)` or"
" `stringify_unsupported(collection)` for collections and dictionaries."
" For details, see https://docs.neptune.ai/help/value_of_unsupported_type"
)
I can open a separate PR with this if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This couldn't be a warning. Probably a new exception. I'll take care of it later today 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before submitting checklist