question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[IMPROVEMENT] Support pathlib Path

See original GitHub issue

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)
  • more ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tqchencommented, Sep 18, 2019
0reactions
tqchencommented, Sep 12, 2019

@cchung100m feel free to take over and send a PR

Read more comments on GitHub >

github_iconTop Results From Across the Web

[IMPROVEMENT] Support pathlib Path · Issue #2222 - GitHub
All functions and methods taking a path as argument should support the pathlib Path type. pathlib is the preferred API to handle paths...
Read more >
How to go on with a tiny improvement idea for pathlib?
Hi, I'm new to this forum, so I don't want to spam the ideas discussion right from the start (seeing the complex discussions...
Read more >
Using Python's Pathlib Module - Practical Business Python
Pathlib is an object oriented interface to the filesystem and provides a more intuitive method to interact with the filesystem in a platform ......
Read more >
How To Use the pathlib Module to Manipulate Filesystem ...
The pathlib module provides several classes, but one of the most important is the Path class. Instances of the Path class represent a...
Read more >
Why You Should Start Using Pathlib as an Alternative to the ...
Let's assume you have a Path object that points to a directory. Pathlib allows you to easily iterate over that directory's content and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found