Skip to content

Fix logging to wandb in attack args for attackresults#647

Merged
jxmorris12 merged 2 commits into
QData:masterfrom
VijayKalmath:fix-logging-to-wandb-inAttackArgs
May 31, 2022
Merged

Fix logging to wandb in attack args for attackresults#647
jxmorris12 merged 2 commits into
QData:masterfrom
VijayKalmath:fix-logging-to-wandb-inAttackArgs

Conversation

@VijayKalmath

Copy link
Copy Markdown
Contributor

What does this PR do?

PR fixes 2 issues seen when logging attack results to wandb

Summary

Logging Attack Results Summary to wandb is currently failing with TypeError - Data row contained incompatible types. Fix involves converting string entries to float(Number) to maintain same datatype throughout the column in the table.

As per the documentation , we do not have not specify project name to allow wandb create a project name automatically. Removed Assertion

Additions

  • Added Code to convert string values in Attack Results Summary to Float for logging to wandb.

Changes

  • Changed method to get project_name for wandb logging

Deletions

  • Deleted Assertion which is not necessary

**Issues Addressed

Checklist

  • The title of your pull request should be a summary of its contribution.
  • Please write detailed description of what parts have been newly added and what parts have been modified. Please also explain why certain changes were made.
  • If your pull request addresses an issue, please mention the issue number in the pull request description to make sure they are linked (and people consulting the issue know you are working on it)
  • To indicate a work in progress please mark it as a draft on Github.
  • Make sure existing tests pass.
  • [ ] Add relevant tests. No quality testing = no merge.
  • [ ] All public methods must have informative docstrings that work nicely with sphinx. For new modules/files, please add/modify the appropriate .rst file in TextAttack/docs/apidoc.'

As per the documentation , we do not have not specify project name
to allow wandb create a project name automatically.

Not specifying project name in AttackArgs led to AssertionError.
Removed Assert line as it not required, and replaced method to get
project name.

Fixes QData#646
Logging Attack Results Summary to wandb is currently failing with
TypeError - Data row contained incompatible types.

The TypeError is because we were trying to log both Number and String
entries to the same column to wandb which is not allowed.

Fix involves converting string entries to float(Number) to maintain
same datatype throughout the column in the table.

Fixes QData#645
@jxmorris12 jxmorris12 merged commit 2979339 into QData:master May 31, 2022
@VijayKalmath VijayKalmath deleted the fix-logging-to-wandb-inAttackArgs branch June 8, 2022 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants