dwavesystems / dwavesystems/dwave-optimization

Intermediate Nodes with custom state data do not overwrite `copy()` method

Open
#478 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
31
Forks
36
Avg merge
16h 55m
Merged PRs (30d)
8

Description

Nodes include: `LinearProgramNode`, `IsInNode`, `QuadraticModelNode`, `PermutationNode`, `AdvancedIndexingNode`, `BasicIndexingNode`, `WhereNode`, `MatrixMultiplyNode`, `ReduceNode`, `ArgSortNode`, `NaryOpNode`, `BroadcastToNode`, `ReshapeNode`, `AccumulateZipNode`, `ArrayValidationNode`, and `DynamicArrayTestingNode`.

It just so happens that none of these nodes are ever copied so this is not necessarily an issue per se. This came up when trying to diagnose issues on `NumberNode` after adding a custom `NodeStateDate` (https://github.com/dwavesystems/dwave-optimization/pull/471/changes/3b10b412faacdfa5f0124d3b87c4f0cba1982a56). Currently, if these nodes were copied, the copy would be filled with junk data.

Possible Solution: Add an `override copy()` method to all and add a `copy()` test on the `ArrayValidationNode`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.