Skip to content
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

Fix ragged nested sequence warning #2195

Merged
merged 4 commits into from
Jun 30, 2023

Conversation

Foxglove144
Copy link
Contributor

@Foxglove144 Foxglove144 commented Jun 16, 2023

Description

Addressed the VisibleDeprecationWarning related to creating an ndarray from ragged nested sequences in the script. Modified the analyze_by_distance function and analyze_by_size function to specify dtype=object when creating the np.asarray() array containing all_assigned_clean. This ensures that the array can handle objects of different types or shapes without triggering the deprecation warning

Fixes # (issue)

Type of change

Please check all relevant options.

  • Improvement (non-breaking)
  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing

Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.

  • Test A
  • Test B

Test Configuration:

  • OS
  • Python version
  • ART version or commit number
  • TensorFlow / Keras / PyTorch / MXNet version

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Signed-off-by: Foxglove144 <arunabhm@protonmail.com>
Signed-off-by: Foxglove144 <arunabhm@protonmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2023

Codecov Report

Merging #2195 (6250986) into dev_1.15.0 (82f8fa2) will decrease coverage by 0.31%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Impacted file tree graph

@@              Coverage Diff               @@
##           dev_1.15.0    #2195      +/-   ##
==============================================
- Coverage       85.61%   85.30%   -0.31%     
==============================================
  Files             308      308              
  Lines           27448    27448              
  Branches         5044     5044              
==============================================
- Hits            23499    23415      -84     
- Misses           2669     2755      +86     
+ Partials         1280     1278       -2     
Impacted Files Coverage Δ
...rt/defences/detector/poison/clustering_analyzer.py 94.93% <100.00%> (ø)

... and 4 files with indirect coverage changes

@beat-buesser beat-buesser self-requested a review June 20, 2023 13:56
@beat-buesser beat-buesser self-assigned this Jun 20, 2023
@beat-buesser beat-buesser changed the base branch from main to dev_1.15.0 June 27, 2023 13:49
@beat-buesser beat-buesser added the improvement Improve implementation label Jun 27, 2023
@beat-buesser beat-buesser added this to Pull request open in ART 1.15.0 via automation Jun 27, 2023
@beat-buesser beat-buesser added this to the ART 1.15.0 milestone Jun 27, 2023
@beat-buesser beat-buesser changed the base branch from dev_1.15.0 to main June 27, 2023 14:12
@beat-buesser beat-buesser changed the base branch from main to dev_1.15.0 June 27, 2023 14:12
Copy link
Collaborator

@beat-buesser beat-buesser left a comment

Choose a reason for hiding this comment

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

Hi @Foxglove144 Thank you very much for fixing this deprecation warning!

@beat-buesser beat-buesser moved this from Pull request open to Pull request review in ART 1.15.0 Jun 28, 2023
@beat-buesser beat-buesser merged commit e3708eb into Trusted-AI:dev_1.15.0 Jun 30, 2023
37 checks passed
ART 1.15.0 automation moved this from Pull request review to Pull request done Jun 30, 2023
@Foxglove144 Foxglove144 deleted the patch-1 branch June 30, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improve implementation
Projects
No open projects
ART 1.15.0
Pull request done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants