Closed aazuspan closed 9 months ago
@aazuspan Do you have an interest in contributing a fix? We are probably stuck with the type
arg name at least until the next major version release, but we could probably work around the issue another way (like move the type checking outside of log_artifact()
or checking the type with path.__class__
).
Sure, I'll make a PR shortly.
When you pass an invalid path type to
Live.log_artifact
, it's supposed to raise anInvalidDataTypeError
:https://github.com/iterative/dvclive/blob/47c87b3de0d727fe4bb4e46fbe76839bfa692e0e/src/dvclive/live.py#L493-L494
Instead, it raises
TypeError: str is not callable
because the builtintype
is shadowed by the parameter:https://github.com/iterative/dvclive/blob/47c87b3de0d727fe4bb4e46fbe76839bfa692e0e/src/dvclive/live.py#L484
It's a pretty minor issue, but I thought I'd point it out since it could cause some confusion. Thanks!