-
Notifications
You must be signed in to change notification settings - Fork 1.3k
metrics: show: Fix show from subdir. #8152
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
Conversation
4a9d636 to
69060f5
Compare
|
Does it fix #8020? |
It does 😄 . I didn't notice that issue. I found the bug researching a discord question |
|
|
||
| res = {} | ||
| for metric in metrics: | ||
| rel_metric_path = os.path.join(relpath, *fs.path.parts(metric)) |
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.
fs.path.join? As I recall one of the problems is windows behavior. dvcfs utlizizes posixpath.
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.
Um. Some unit tests are failing with fs.path.join.
os.path.join did solve the original issue.
@pared I wonder if this would be a breaking change for windows 🤔 (and potentially vscode?) as we would be changing the returned path format. So anything relying on json output would get different keys after this merge
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.
My bad, metrics results are relying on os specific paths. I wonder if that won't be problematic in the future. In plots we are heavily relying on fs.path. This is inconsistent, we might need to consider unifying it at some point.
69060f5 to
86df4da
Compare
86df4da to
6f0e562
Compare
86df4da to
fb5ac28
Compare
fb5ac28 to
ccc3209
Compare
This was a regression introduced in #7712. Calling `repo.metrics.show` from a subdir stopped returning metrics because `fs.isfile(metric)` check returned false.
ccc3209 to
5241c63
Compare
Closes #8020
This was a regression introduced in #7712.
Calling
repo.metrics.showfrom a subdir stopped returning metrics becausefs.isfile(metric)check returned false.