-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[IMPROVEMENT] Support pathlib Path #2222
Comments
Thanks, @obust for the suggestion. Given that pathlib is not available in 2.7, we might need to be a bit mindful on backward compatibility, other than that, I to tag this as help wanted and anyone is welcomed to bring in this feature |
Oh, you are right, it is not in the 2.7 standard library but is available through PyPI.
|
I think cast arguments to string is going to be easier for now |
@obust would you like to act on this? |
I don't have authorization to contribute PRs yet. Feel free to pick it up for now :) |
Hi @tqchen Do we still need to cast the variable
|
@cchung100m feel free to take over and send a PR |
Feature Request
All functions and methods taking a path as argument should support the
pathlib Path
type.pathlib
is the preferred API to handle paths in python 2.7+ (although there is no official PEP8 recommendation). It would be good to at support it and maybe even advertise it in the tutorials to display modern python usage.The following functions fail when given a
Path
argument:autotvm.callback.log_to_file(filepath)
autotvm.apply_history_best(filepath)
lib.export_library(filepath)
The text was updated successfully, but these errors were encountered: