Skip to content

Wb 5493 windows table logging classes issue#3145

Merged
vwrj merged 10 commits intomasterfrom
WB-5493-windows-table-logging-classes-issue
Jan 19, 2022
Merged

Wb 5493 windows table logging classes issue#3145
vwrj merged 10 commits intomasterfrom
WB-5493-windows-table-logging-classes-issue

Conversation

@vwrj
Copy link
Copy Markdown
Contributor

@vwrj vwrj commented Jan 14, 2022

Fixes WB-5493
https://wandb.atlassian.net/browse/WB-5493

Simple repro:

table = wandb.Table(["id", "img"])
img1 = wandb.Image(np.zeros((2,3,4)), boxes=boxes, classes=wandb_classes)
img2 = wandb.Image(np.ones((2,3,4)), boxes=boxes, classes=wandb_classes)
table.add_data(1, img1)
table.add_data(2, img2)

Description

The error happens on Windows because of Windows' back-slashed paths. When we store an entry in an artifact's manifest, we convert its name to a forward-slashed path.

While adding another object to the artifact, we first check to see if an entry with that same path already exists in the manifest. In this case, because we didn't convert to forward slashes before checking, the check passed and we went ahead to open a new file --> this function threw an error because the file already exists.

This PR ensures that every target path in Artifact.add_* is forward-slashed.

Testing

How was this PR tested?

Checklist

  • Name PR "[WB-NNNN][WB-MMMM] Add support for..." similar to entries in CHANGELOG.md
  • Include reference to internal ticket "Fixes WB-NNNN" (and github issue "Fixes #NNNN" if applicable)

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 14, 2022

Codecov Report

Merging #3145 (3820d8b) into master (6f3febc) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3145      +/-   ##
==========================================
+ Coverage   79.03%   79.06%   +0.02%     
==========================================
  Files         210      210              
  Lines       27636    27640       +4     
==========================================
+ Hits        21843    21853      +10     
+ Misses       5793     5787       -6     
Flag Coverage Δ
functest 57.27% <66.66%> (+0.06%) ⬆️
unittest 68.86% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
wandb/sdk/wandb_artifacts.py 81.68% <100.00%> (+0.08%) ⬆️
wandb/util.py 74.41% <100.00%> (ø)
wandb/sdk/launch/docker.py 86.33% <0.00%> (-0.55%) ⬇️
wandb/sdk/lib/git.py 76.35% <0.00%> (ø)
wandb/sdk/launch/agent/agent.py 92.42% <0.00%> (+1.51%) ⬆️
wandb/sdk/internal/meta.py 90.68% <0.00%> (+3.10%) ⬆️

@vwrj vwrj requested a review from tssweeney January 14, 2022 09:47
Copy link
Copy Markdown
Contributor

@tssweeney tssweeney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vwrj vwrj merged commit 7e6bf5c into master Jan 19, 2022
@vwrj vwrj deleted the WB-5493-windows-table-logging-classes-issue branch January 19, 2022 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants