docstr: This test does the following steps:
  1. create a net builder
  2. use the net builder to create a synthetic reward network
  3. export the synthetic reward network
  4. use the exported network to create a predictor wrapper
  5. create raw input and preprocessed inputs
  6. compare if the results between the following matches:
      a. synthetic reward network on preprocessed input
      b. export network on preprocessed input
      c. predictor wrapper on raw input
docstr_tok: ["This","test","does","the","following","steps",":","1.","create","a","net","builder","2.","use","the","net","builder","to","create","a","synthetic","reward","network","3.","export","the","synthetic","reward","network","4.","use","the","exported","network","to","create","a","predictor","wrapper","5.","create","raw","input","and","preprocessed","inputs","6.","compare","if","the","results","between","the","following","matches",":","a.","synthetic","reward","network","on","preprocessed","input","b.","export","network","on","preprocessed","input","c.","predictor","wrapper","on","raw","input"]
code: def _test_synthetic_reward_net_builder_continuous_actions(
      self, builder: SyntheticRewardNetBuilder
  ) -> None:
      """
      This test does the following steps:
      1. create a net builder
      2. use the net builder to create a synthetic reward network
      3. export the synthetic reward network
      4. use the exported network to create a predictor wrapper
      5. create raw input and preprocessed inputs
      6. compare if the results between the following matches:
          a. synthetic reward network on preprocessed input
          b. export network on preprocessed input
          c. predictor wrapper on raw input
      """
      state_normalization_data = _create_norm(STATE_DIM)
      action_normalization_data = _create_norm(
          ACTION_DIM, offset=STATE_DIM
      )
      state_preprocessor = Preprocessor(
          state_normalization_data.dense_normalization_parameters
      )
      action_preprocessor = Preprocessor(
          action_normalization_data.dense_normalization_parameters
      )
      reward_net = builder.build_synthetic_reward_network(
          state_normalization_data,
          action_normalization_data=action_normalization_data,
      ).eval()
      input = _create_input()
      preprocessed_input = _create_preprocessed_input(
          input, state_preprocessor, action_preprocessor
      )
      output = reward_net(preprocessed_input).predicted_reward
      assert output.shape == (BATCH_SIZE, 1)
  
      export_net = reward_net.export_mlp().cpu().eval()
      export_output = export_net(
          preprocessed_input.state.float_features,
          preprocessed_input.action.float_features,
      )
      predictor_wrapper = builder.build_serving_module(
          SEQ_LEN,
          reward_net,
          state_normalization_data,
          action_normalization_data=action_normalization_data,
      )
      self.assertIsInstance(
          predictor_wrapper, SyntheticRewardPredictorWrapper
      )
      for i in range(BATCH_SIZE):
          input_to_predictor = torch.cat(
              (
                  input.state.float_features[:, i, :],
                  input.action.float_features[:, i, :],
              ),
              dim=1,
          )
          input_to_predictor_presence = torch.ones(
              SEQ_LEN, STATE_DIM + ACTION_DIM
          )
          predictor_output = predictor_wrapper(
              (input_to_predictor, input_to_predictor_presence)
          )
          if IS_FB_ENVIRONMENT:
              predictor_output = predictor_output[1][2]
          npt.assert_array_almost_equal(
              predictor_output, export_output[i], decimal=4
          )
          npt.assert_almost_equal(
              torch.sum(predictor_output[-input.valid_step[i] :]),
              output[i],
              decimal=4,
          )
  
imports: import unittest
  import numpy.testing
  import torch
  from reagent.core import parameters, types
  from reagent.core.fb_checker import IS_FB_ENVIRONMENT
  from reagent.core.parameters import NormalizationData, NormalizationParameters
  from reagent.net_builder.synthetic_reward.ngram_synthetic_reward import NGramConvNetSyntheticReward, NGramSyntheticReward
  from reagent.net_builder.synthetic_reward.sequence_synthetic_reward import SequenceSyntheticReward
  from reagent.net_builder.synthetic_reward.single_step_synthetic_reward import SingleStepSyntheticReward
  from reagent.net_builder.synthetic_reward.transformer_synthetic_reward import TransformerSyntheticReward
  from reagent.net_builder.synthetic_reward_net_builder import SyntheticRewardNetBuilder
  from reagent.net_builder.unions import SyntheticRewardNetBuilder__Union
  from reagent.preprocessing.identify_types import CONTINUOUS
  from reagent.preprocessing.preprocessor import Preprocessor
label_desc: Use image node_id 12 for calling the TestSyntheticRewardNetBuilder obj's underlying member method code with example usage: obj._test_synthetic_reward_net_builder_continuous_actions(builder) without return types