Repository: dwavesystems/dimod
Issue: Fix ScaleComposite to not use info field

Right now the `ScaleComposite` relies on `BQM.info` which has been deprecated as of [0.9.0](https://github.com/dwavesystems/dimod/releases/tag/0.9.0).

See https://github.com/dwavesystems/dimod/pull/627/files#diff-650a9a798c6df570212e820d8acc920bR122 in #627 

Changed files:
tests/test_scalecomposite.py, dimod/reference/composites/scalecomposite.py

diff --git a/dimod/reference/composites/scalecomposite.py b/dimod/reference/composites/scalecomposite.py
index 40c37866..c28691ab 100644
--- a/dimod/reference/composites/scalecomposite.py
+++ b/dimod/reference/composites/scalecomposite.py
@@ -122,12 +122,12 @@ class ScaleComposite(ComposedSampler):
             ignored_variables, ignored_interactions)
 
         child = self.child
-        bqm_copy = _scaled_bqm(bqm, scalar, bias_range, quadratic_range,
+        bqm_copy, scalar = _scaled_bqm(bqm, scalar, bias_range, quadratic_range,
                                ignored_variables, ignored_interactions,
                                ignore_offset)
         response = child.sample(bqm_copy, **parameters)
 
-        return _scale_back_response(bqm, response, bqm_copy.info['scalar'],
+        return _scale_back_response(bqm, response, scalar,
                                     ignored_variables, ignored_interactions,
                                     ignore_offset)
 
@@ -219,6 +219,7 @@ def _scale_back_response(bqm, response, scalar, ignored_interactions,
     else:
         response.record.energy = bqm.energies((response.record.sample,
                                                response.variables))
+    response.info['scalar'] = scalar
     return response
 
 
@@ -292,8 +293,8 @@ def _scaled_bqm(bqm, scalar, bias_range, quadratic_range,
     bqm_copy.scale(scalar, ignored_variables=ignored_variables,
                    ignored_interactions=ignored_interactions,
                    ignore_offset=ignore_offset)
-    bqm_copy.info.update({'scalar': scalar})
-    return bqm_copy
+
+    return bqm_copy, scalar
 
 
 def check_isin(key, key_list):
diff --git a/tests/test_scalecomposite.py b/tests/test_scalecomposite.py
index d0f05d93..adae6f06 100644
--- a/tests/test_scalecomposite.py
+++ b/tests/test_scalecomposite.py
@@ -80,12 +80,12 @@ class ScalingChecker(Sampler, PolySampler):
         self.child = child_sampler
 
         if bqm is not None:
-            self.bqm = _scaled_bqm(bqm, **scale_options)
+            self.bqm, _ = _scaled_bqm(bqm, **scale_options)
 
         elif h is not None and J is not None:
             if max(map(len, J.keys())) == 2:
                 bqm = BinaryQuadraticModel.from_ising(h, J, offset=offset)
-                self.bqm = _scaled_bqm(bqm, **scale_options)
+                self.bqm, _ = _scaled_bqm(bqm, **scale_options)
             else:
                 h_sc, J_sc, offset_sc = _scaled_hubo(h, J, offset=offset,
                                                      **scale_options)
@@ -136,7 +136,7 @@ class TestScaleComposite(unittest.TestCase):
         scalar = None
         quadratic_range = None
         ignore_offset = False
-        bqm_new = _scaled_bqm(bqm, scalar, 2, quadratic_range,
+        bqm_new, _ = _scaled_bqm(bqm, scalar, 2, quadratic_range,
                               ignored_variables, ignored_interactions,
                               ignore_offset)
 
@@ -150,7 +150,7 @@ class TestScaleComposite(unittest.TestCase):
 
         ignored_variables, ignored_interactions = _check_params(None, None)
         bqm = BinaryQuadraticModel.from_ising(linear, quadratic, offset=5.0)
-        bqm_new = _scaled_bqm(bqm, scalar, 2, quadratic_range,
+        bqm_new, _ = _scaled_bqm(bqm, scalar, 2, quadratic_range,
                               ignored_variables, ignored_interactions,
                               True)
 
@@ -162,7 +162,7 @@ class TestScaleComposite(unittest.TestCase):
         bqm_scaled = BinaryQuadraticModel.from_ising(hsc, Jsc, offset=5.0)
         self.assertEqual(bqm_scaled, bqm_new)
 
-        bqm_new = _scaled_bqm(bqm, scalar, 1, (-1, 0.4),
+        bqm_new, _ = _scaled_bqm(bqm, scalar, 1, (-1, 0.4),
                               ignored_variables, ignored_interactions,
                               ignore_offset)
 
@@ -181,7 +181,7 @@ class TestScaleComposite(unittest.TestCase):
             ignored_variables, ignored_interactions)
         bqm = BinaryQuadraticModel.from_ising(linear, quadratic)
 
-        bqm_new = _scaled_bqm(bqm, scalar, (2, 2), quadratic_range,
+        bqm_new, _ = _scaled_bqm(bqm, scalar, (2, 2), quadratic_range,
                               ignored_variables, ignored_interactions,
                               ignore_offset)
 
@@ -200,7 +200,7 @@ class TestScaleComposite(unittest.TestCase):
             ignored_variables, ignored_interactions)
 
         bqm = BinaryQuadraticModel.from_ising(linear, quadratic)
-        bqm_new = _scaled_bqm(bqm, scalar, 1, 0.5,
+        bqm_new, _ = _scaled_bqm(bqm, scalar, 1, 0.5,
                               ignored_variables, ignored_interactions,
                               ignore_offset)