hunk.code_window:                 shape=[low_action.size], mean=0.0, stddev=1.0)
               exploration_value = tf.assign_add(
                   exploration_sample,
                   theta * (.0 - exploration_sample) + sigma * normal_sample)
               stochastic_actions = deterministic_actions + eps * (
                   high_action - low_action) * exploration_value
           self.actions = tf.cond(stochastic, lambda: stochastic_actions,
                                  lambda: deterministic_actions)
  
hunk.labels: keep keep keep keep replace replace keep keep keep
hunk.after_edit:             stochastic_actions = tf.clip_by_value(
                   deterministic_actions +
                   eps * (high_action - low_action) * exploration_value,
                   low_action, high_action)
  
hunk.file_path: python/ray/rllib/agents/ddpg/ddpg_policy_graph.py
hunk.type: replace
file: #!/bin/bash
  
  #############################
  # build deploy file and deploy cluster
  sh cleanup.sh
  rm -rf local_deploy
  ./prepare.sh -t local_deploy
  pushd local_deploy
  local_ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
  #echo "use local_ip" $local_ip
  OVERWRITE="ray.java.start.redis_port=34222;ray.java.start.node_ip_address=$local_ip;ray.java.start.deploy=true;ray.java.start.run_mode=CLUSTER"
  echo OVERWRITE is $OVERWRITE
  ./run.sh start --head --overwrite=$OVERWRITE > cli.log 2>&1 &
  popd
  sleep 10
  
  # auto-pack zip for app example
  pushd example
  if [ ! -d "app1/" ];then
      mkdir app1
  fi
  cp -rf target/ray-tutorial-1.0.jar app1/
  zip -r app1.zip app1
  popd
  
  # run with cluster mode
  pushd local_deploy
  export RAY_CONFIG=ray/ray.config.ini
  ARGS=" --package ../example/app1.zip --class org.ray.example.HelloWorld --args=test1,test2  --redis-address=$local_ip:34222"
  ../local_deploy/run.sh submit $ARGS
  popd
  