当前位置:   article > 正文

(框架)Deepracer Local - 001: 搭建本地环境_deepracer本地训练

deepracer本地训练

1. 安装环境

推荐本地环境: Ubuntu (如果windowns必要的话,就装双系统,我的台式机就是双系统)
云环境: 阿里云,配置如下,最低配置 2 核 8G 内存,尽可能选择CPU频率高的,抢占式比较便宜,一天5、6块钱,停机的话每天 1块多钱。学生的话应该还有折扣
在这里插入图片描述

2. 预安装脚本

通过我多次实验,运行以下脚本可以解决90% 安装时碰到的问题

#!/bin/bash

## setup vim global configure
echo "set number">~/.vimrc
echo "set ts=4 sw=4">>~/.vimrc

## setup crontab configure
echo "#*/3 * * * * /home/rambo/deepracer-for-cloud/keepMonitorSetsid.sh">>/var/spool/cron/crontabs/root
echo "#*/2 * * * * /home/rambo/deepracer-for-cloud/AutoTrainTools.sh">>/var/spool/cron/crontabs/root
echo "#00 00 * * * /home/rambo/tools/HouseKeeping.sh">>/var/spool/cron/crontabs/root

## install docker and required software
curl https://get.docker.com | sh
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository   "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update && sudo apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io
sudo apt-get install -y jq awscli python3-pip python3-boto3 docker-compose

## validation required software
apt list --installed>installed.txt
cat installed.txt | grep jq/focal | wc -l>result.txt
cat installed.txt | grep awscli/focal | wc -l>>result.txt
cat installed.txt | grep python3-boto3/focal | wc -l>>result.txt
cat installed.txt | grep docker-compose/focal | wc -l>>result.txt

## setup virtualenv tools workon, use for data analysis 
mkdir $HOME/.virtualenvs
pip3 install pbr
pip3 install virtualenv
pip3 install virtualenvwrapper

echo "export WORKON_HOME=$HOME/.virtualenvs">>/etc/profile
echo "export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3">>/etc/profile
echo "export TOOL_HOME=/home/rambo/tools">>/etc/profile
echo "export DR_HOME=/home/rambo/deepracer-for-cloud">>/etc/profile
source /etc/profile

echo "export WORKON_HOME=$HOME/.virtualenvs">>~/.bashrc
echo "export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3">>~/.bashrc
echo "export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv">>~/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh">>~/.bashrc
source ~/.bashrc

rm -rf installed.txt

## restart system
reboot

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48

3. 从 github 下载 deepracer 代码 并初始化

官方安装教程: Entry>>>

mkdir -p /home/rambo
cd /home/rambo/
git clone https://github.com/aws-deepracer-community/deepracer-for-cloud.git
deepracer
cd deepracer-for-cloud & ./bin/init.sh -c local -a cpu
reboot
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

4. 首次运行deepracer

4.1 修改activate.sh (云环境需要修改)
修改 localhost 为你的阿里云公网ip,否则无法通过公网访问你的网页,后续将会讲到原理。
在这里插入图片描述
4.2 激活环境变量

cd /home/rambo/deepracer-for-cloud & souce bin/activate.sh
  • 1

4.3 运行训练命令

dr-start-training
  • 1

如果不出错你应该会看到以下画面
在这里插入图片描述
如果你打开多个窗口可以通过docker ps 命令查看当前运行的 docker
可以看到有四个docker正在运行
在这里插入图片描述
可以通过docker logs -f <container id>查看 docker 的 输出 log
4.4 docker logs
4.4.1 robomaker

root@rambo:/home/rambo/deepracer-for-cloud# docker ps
CONTAINER ID   IMAGE                                                      COMMAND                  CREATED
48069121ac9f   awsdeepracercommunity/deepracer-robomaker:5.0.9-cpu-avx2   "/bin/bash -c './run…"   2 hours ago
b542ad455619   awsdeepracercommunity/deepracer-sagemaker:5.0.0-cpu        "bash -m start.sh tr…"   2 hours ago
e63a89cbb465   awsdeepracercommunity/deepracer-rlcoach:5.0.6              "/bin/sh -c '(python…"   2 hours ago
1bf87d75aa65   minio/minio:latest                                         "/usr/bin/docker-ent…"   46 hours ago
root@rambo:/home/rambo/deepracer-for-cloud# docker logs -f 48069121ac9f
05/01/2023 13:43:31 passing arg to libvncserver: -rfbport
05/01/2023 13:43:31 passing arg to libvncserver: 5900
05/01/2023 13:43:31 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 60
05/01/2023 13:43:31
05/01/2023 13:43:31 wait_for_client: WAIT:0
05/01/2023 13:43:31
05/01/2023 13:43:31 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/2560
05/01/2023 13:43:31
05/01/2023 13:43:31 Listening for VNC connections on TCP port 5900
05/01/2023 13:43:31 Listening for VNC connections on TCP6 port 5900
05/01/2023 13:43:31 listen6: bind: Address already in use
05/01/2023 13:43:31 Not listening on IPv6 interface.
05/01/2023 13:43:31

The VNC desktop is:      48069121ac9f:0
PORT=5900
JWM: warning: /etc/jwm/system.jwmrc[6]: invalid include: /etc/jwm/debian-menu
IP: 10.0.0.85 172.19.0.6 10.0.1.183  (48069121ac9f)
[s3] Successfully downloaded yaml file from s3 key 2022-reinvent-champ-500-10001/training_params.yaml to local
{'ALTERNATE_DRIVING_DIRECTION': 'False', 'AWS_REGION': 'us-east-1', 'BODY_SHELL_TYPE': ['deepracer'], 'CAR_COLOANDOMIZATION': 'False', 'JOB_TYPE': 'TRAINING', 'KINESIS_VIDEO_STREAM_NAME': '', 'METRICS_S3_BUCKET': ['bucket'5', 'MODEL_METADATA_FILE_S3_KEY': ['custom_files/model_metadata.json'], 'NUM_WORKERS': '1', 'RACER_NAME': 'FastJOB_ACCOUNT_ID': 'Dummy', 'ROUND_ROBIN_ADVANCE_DIST': '0.05', 'SAGEMAKER_SHARED_S3_BUCKET': ['bucket'], 'SAGEMA'2022-reinvent-champ-500-10001', 'START_POSITION_OFFSET': '0.0', 'TRAINING_JOB_ARN': 'arn:Dummy', 'WORLD_NAME':
[s3] Successfully downloaded model metadata                  from s3 key custom_files/model_metadata.json to lo
Sensor list ['FRONT_FACING_CAMERA'], network DEEP_CONVOLUTIONAL_NETWORK_SHALLOW, simapp_version 4.0, training_aclipping_dist': 2.0}
xacro: in-order processing became default in ROS Melodic. You can drop the option.
... logging to /root/.ros/log/f17c5940-8cfe-11ed-9778-02420a000055/roslaunch-48069121ac9f-122.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://48069121ac9f:46839/

SUMMARY
========

PARAMETERS
 * /ALTERNATE_DRIVING_DIRECTION: False
 * /AWS_REGION: us-east-1
 * /BODY_SHELL_TYPE: deepracer
 * /CAR_COLOR: Red
 * /CAR_NAME: FastCar
 * /CHANGE_START_POSITION: True
 * /DISPLAY_NAME: FastCar
 * /ENABLE_DOMAIN_RANDOMIZATION: False
 * /JOB_TYPE: TRAINING
 * /KINESIS_VIDEO_STREAM_NAME:
 * /METRICS_S3_BUCKET: bucket
 * /METRICS_S3_OBJECT_KEY: 2022-reinvent-cha...
 * /MIN_EVAL_TRIALS: 5
 * /MODEL_METADATA_FILE_S3_KEY: custom_files/mode...
 * /NUM_WORKERS: 1
 * /RACER_NAME: FastCar
 * /RACE_TYPE: TIME_TRIAL
 * /REWARD_FILE_S3_KEY: custom_files/rewa...
 * /ROBOMAKER_SIMULATION_JOB_ACCOUNT_ID: Dummy
 * /ROUND_ROBIN_ADVANCE_DIST: 0.05
 * /SAGEMAKER_SHARED_S3_BUCKET: bucket
 * /SAGEMAKER_SHARED_S3_PREFIX: 2022-reinvent-cha...
 * /SIMTRACE_S3_BUCKET: bucket
 * /SIMTRACE_S3_PREFIX: 2022-reinvent-cha...
 * /START_POSITION_OFFSET: 0.0
 * /TRAINING_JOB_ARN: arn:Dummy
 * /WORLD_NAME: 2022_reinvent_champ
 * /racecar/joint_state_controller/publish_rate: 60
 * /racecar/joint_state_controller/type: joint_state_contr...
 * /racecar/left_front_wheel_velocity_controller/joint: left_front_wheel_...
 * /racecar/left_front_wheel_velocity_controller/pid/d: 0.0
 * /racecar/left_front_wheel_velocity_controller/pid/i: 0.0
 * /racecar/left_front_wheel_velocity_controller/pid/i_clamp: 0.0
 * /racecar/left_front_wheel_velocity_controller/pid/p: 0.5
 * /racecar/left_front_wheel_velocity_controller/type: effort_controller...
 * /racecar/left_rear_wheel_velocity_controller/joint: left_rear_wheel_j...
 * /racecar/left_rear_wheel_velocity_controller/pid/d: 0.0
 * /racecar/left_rear_wheel_velocity_controller/pid/i: 0.0
 * /racecar/left_rear_wheel_velocity_controller/pid/i_clamp: 0.0
 * /racecar/left_rear_wheel_velocity_controller/pid/p: 1.0
 * /racecar/left_rear_wheel_velocity_controller/type: effort_controller...
 * /racecar/left_steering_hinge_position_controller/joint: left_steering_hin...
 * /racecar/left_steering_hinge_position_controller/pid/d: 0.5
 * /racecar/left_steering_hinge_position_controller/pid/i: 0.0
 * /racecar/left_steering_hinge_position_controller/pid/p: 1.0
 * /racecar/left_steering_hinge_position_controller/type: effort_controller...
 * /racecar/right_front_wheel_velocity_controller/joint: right_front_wheel...
 * /racecar/right_front_wheel_velocity_controller/pid/d: 0.0
 * /racecar/right_front_wheel_velocity_controller/pid/i: 0.0
 * /racecar/right_front_wheel_velocity_controller/pid/i_clamp: 0.0
 * /racecar/right_front_wheel_velocity_controller/pid/p: 0.5
 * /racecar/right_front_wheel_velocity_controller/type: effort_controller...
 * /racecar/right_rear_wheel_velocity_controller/joint: right_rear_wheel_...
 * /racecar/right_rear_wheel_velocity_controller/pid/d: 0.0
 * /racecar/right_rear_wheel_velocity_controller/pid/i: 0.0
 * /racecar/right_rear_wheel_velocity_controller/pid/i_clamp: 0.0
 * /racecar/right_rear_wheel_velocity_controller/pid/p: 1.0
 * /racecar/right_rear_wheel_velocity_controller/type: effort_controller...
 * /racecar/right_steering_hinge_position_controller/joint: right_steering_hi...
 * /racecar/right_steering_hinge_position_controller/pid/d: 0.5
 * /racecar/right_steering_hinge_position_controller/pid/i: 0.0
 * /racecar/right_steering_hinge_position_controller/pid/p: 1.0
 * /racecar/right_steering_hinge_position_controller/type: effort_controller...
 * /racecar/robot_description: <?xml version="1....
 * /rosdistro: melodic
 * /rosversion: 1.14.13
 * /use_sim_time: True

NODES
  /
    agent (deepracer_simulation_environment/run_rollout_rl_agent.sh)
    agents_video_editor (deepracer_simulation_environment/agents_video_editor.py)
    car_reset_node (deepracer_simulation_environ[INFO] [1672926220.612822, 0.000000]: Loading model XML from ro
[INFO] [1672926220.630882, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1672926224.558686, 0.000000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1672926225.029959, 0.000000]: Spawn status: SpawnModel: Successfully spawned entity
[CameraManager]: Added <markov.cameras.handlers.follow_car_camera.FollowCarCamera object at 0x7f0938d517b8> to
[CameraManager]: Added <markov.cameras.handlers.top_camera.TopCamera object at 0x7f0938d51ac8> to camera_namesp
[CameraManager]: Removed <markov.cameras.handlers.follow_car_camera.FollowCarCamera object at 0x7f0938d517b8> f
[CameraManager]: Removed <markov.cameras.handlers.top_camera.TopCamera object at 0x7f0938d51ac8> from camera_na
Pausing physics after initializing the cars
Publishing to KVS stream is enabled: True
[ INFO] [1672926222.564217814]: DeepRacerGazeboSystemPlugin: Load
[ INFO] [1672926222.568071699]: DeepRacerGazeboSystemPlugin: Finished loading.
[ INFO] [1672926222.611815967]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1672926222.621880266]: waitForService: Service [/gazebo/set_physics_properties] has not been advertise
[ INFO] [1672926224.470260328]: DeepRacerGazeboSystemPlugin: Init Complete
[ INFO] [1672926224.540085966]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1672926225.043333738, 0.001000000]: Physics dynamic reconfigure ready.
[ INFO] [1672926227.771968223, 0.001000000]: Camera Plugin: Using the 'robotNamespace' param: '/racecar/'
[ INFO] [1672926227.802620536, 0.001000000]: Camera Plugin (ns = /racecar/)  <tf_prefix_>, set to "/racecar"
[ INFO] [1672926228.103771083, 0.001000000]: Loading gazebo_ros_control plugin
[ INFO] [1672926228.103919460, 0.001000000]: Starting gazebo_ros_control plugin in namespace: /racecar
[ INFO] [1672926228.105292331, 0.001000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [
[ INFO] [1672926228.295442727, 0.001000000]: Loaded gazebo_ros_control.
Topic [2022_reinvent_champ//racecar/main_camera/camera_link/camera_sensor/image] is not valid.
Spawning sub camera model
Warning [parser.cc:950] XML Element[projection_type], child of element[camera] not defined in SDF. Ignoring[pro
Topic [2022_reinvent_champ//sub_camera/camera_link/camera_sensor/image] is not valid.
+ export PYTHONUNBUFFERED=1
+ PYTHONUNBUFFERED=1
+ ROLLOUT_IDX=0
+ python3 -m markov.rollout_worker --rollout_idx 0
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
S3 bucket: bucket
S3 prefix: 2022-reinvent-champ-500-10001
S3 endpoint URL: http://minio:9000
[s3] Successfully downloaded reward function from s3 key custom_files/reward_function.py to local
Succeed to import user's reward function
[CameraManager]: Added <markov.cameras.handlers.follow_car_camera.FollowCarCamera object at 0x7fa7cd833f28> to
[CameraManager]: Added <markov.cameras.handlers.top_camera.TopCamera object at 0x7fa7f6c6e7f0> to camera_namesp
[s3] Successfully downloaded model metadata                  from s3 key custom_files/model_metadata.json to lo
Sensor list ['FRONT_FACING_CAMERA'], network DEEP_CONVOLUTIONAL_NETWORK_SHALLOW, simapp_version 4.0, training_aclipping_dist': 2.0}
Action space from file: {'steering_angle': {'high': 30, 'low': -28}, 'speed': {'high': 0.6, 'low': 0.45}}
[s3] Successfully downloaded ip config from                  s3 key 2022-reinvent-champ-500-10001/ip/ip.json to
[s3] Successfully downloaded hyperparameters from                      s3 key 2022-reinvent-champ-500-10001/ip/
Using the following hyper-parameters
{
  "batch_size": 512,
  "beta_entropy": 0.01,
  "discount_factor": 0.995,
  "e_greedy_value": 0.05,
  "epsilon_steps": 20000,
  "exploration_type": "categorical",
  "loss_type": "huber",
  "lr": 0.0007,
  "num_episodes_between_training": 20,
  "num_epochs": 10,
  "stack_size": 1,
  "term_cond_avg_score": 350.0,
  "term_cond_max_episodes": 100
}
Exception when checking for DEEPRACER_JOB_TYPE_ENV 'LOCAL' is not a valid DeepRacerJobType
[s3] Successfully downloaded 11_Step-0.ckpt.data-00000-of-00001 from                  s3 key 2022-reinvent-cham00-of-00001.
[s3] Successfully downloaded 11_Step-0.ckpt.index from                  s3 key 2022-reinvent-champ-500-10001/mo
[s3] Successfully downloaded 11_Step-0.ckpt.meta from                  s3 key 2022-reinvent-champ-500-10001/mod
[s3] Successfully downloaded .ready from                  s3 key 2022-reinvent-champ-500-10001/model/.ready to
[s3] Successfully downloaded .ready from                  s3 key 2022-reinvent-champ-500-10001/model/.ready to
## Creating graph - name: MultiAgentGraphManager
## Start physics before creating graph
## Create graph
## Creating agent - name: agent
[RL] Created agent loggers
[RL] Dynamic import of memory:  "DeepRacerMemoryParameters" {
    "load_memory_from_file_path": null,
    "max_size": [
        "<MemoryGranularity.Transitions: 0>",
        1000000
    ],
    "n_step": -1,
    "shared_memory": false,
    "train_to_eval_ratio": 1
}

[RL] Dynamically imported of memory <markov.memories.deepracer_memory.DeepRacerMemory object at 0x7fa7b60dc0b8>
[RL] Setting devices
[RL] Setting filters
[RL] Setting filter devices: numpy
[RL] Setting Phase
[RL] After setting Phase
[RL] Setting signals
[RL] Agent init successful
[RL] ActorCriticAgent init
[RL] ActorCriticAgent  init successful
## Created agent: agent
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/rl_coach/architectures/tensorflow_components/heais deprecated and will be removed after 2018-10-01.
Instructions for updating:
The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probabi
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/contrib/distributions/python/ops/mvn_ear_operator) is deprecated and will be removed after 2018-10-01.
Instructions for updating:
The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probabi
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/contrib/distributions/python/ops/mvn_s.affine_linear_operator) is deprecated and will be removed after 2018-10-01.
Instructions for updating:
The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probabi
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/contrib/distributions/python/ops/bijeps.shape) is deprecated and will be removed after 2018-10-01.
Instructions for updating:
The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probabi
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/distributions/kullback_lei and will be removed after 2018-10-01.
Instructions for updating:
The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probabi
## Stop physics after creating graph
## Creating session
Creating regular session
2023-01-05 13:47:04.862078: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions
Checkpoint> Restoring from path=./checkpoint_robomaker/agent/11_Step-0.ckpt
[BestModelSelection] Number of evaluations: 0 Evaluation episode progress: []
[BestModelSelection] Evaluation episode progress mean: None
[BestModelSelection] current progress mean: None >= best progress mean: None
[BestModelSelection] Updating the best checkpoint to "11_Step-0.ckpt" from "None".
[s3] Successfully uploaded deepracer checkpoint to                  s3 bucket bucket with s3 key 2022-reinvent-
Reset agent
Reset agent finished
SIM_TRACE_LOG:0,1,0.6158,0.4621,131.5896,27.66,0.46,[27.65998655627193, 0.4616798338555716],0.0000,False,True,0

SIM_TRACE_LOG:0,2,0.6158,0.4621,131.5896,21.14,0.52,[21.14067853826014, 0.5166042275386177],2.3931,False,True,0

SIM_TRACE_LOG:0,3,0.6056,0.4735,131.5931,-13.19,0.45,[-13.187847432881064, 0.45],1.5093,False,True,0.4672,1,33.

SIM_TRACE_LOG:0,4,0.5880,0.4905,132.0661,-28.00,0.45,[-28.0, 0.45],1.2650,False,True,0.5404,1,33.28,41.094,in_p

SIM_TRACE_LOG:0,5,0.5626,0.5220,131.5563,-28.00,0.45,[-28.0, 0.45],1.2418,False,True,0.6619,1,33.28,41.122,in_p

SIM_TRACE_LOG:0,6,0.5435,0.5480,130.8447,9.26,0.60,[9.262538080108165, 0.6],1.3703,False,True,0.7586,1,33.28,41

SIM_TRACE_LOG:0,7,0.5219,0.5786,129.9631,-28.00,0.53,[-28.0, 0.5252708917652322],1.2659,False,True,0.8703,1,33.

SIM_TRACE_LOG:0,8,0.5049,0.6051,129.0315,-0.70,0.58,[-0.703149143717372, 0.5771569178762861],1.3685,False,True,

SIM_TRACE_LOG:0,9,0.4824,0.6412,127.8357,-10.29,0.54,[-10.293000863545661, 0.5435133701797971],1.2274,False,Tru

SIM_TRACE_LOG:0,10,0.4546,0.6817,127.2120,-2.63,0.57,[-2.6338082251363026, 0.5733328031123175],1.3223,False,Tru

SIM_TRACE_LOG:0,11,0.4348,0.7155,126.2717,6.37,0.45,[6.37402493151906, 0.45],1.0733,False,True,1.3517,1,33.28,4

SIM_TRACE_LOG:0,12,0.4163,0.7451,125.6576,-0.44,0.49,[-0.4385930093844479, 0.4908977934204706],1.1142,False,Tru

SIM_TRACE_LOG:0,13,0.3901,0.7823,125.5697,-1.35,0.60,[-1.347394179495339, 0.6],1.1989,False,True,1.5912,2,33.28

SIM_TRACE_LOG:0,14,0.3724,0.8122,124.9235,26.23,0.56,[26.230439516247735, 0.5551959401381897],1.0295,False,True

SIM_TRACE_LOG:0,15,0.3515,0.8471,124.2475,30.00,0.52,[30.0, 0.5174350748940163],0.9228,False,True,1.8138,2,33.2

SIM_TRACE_LOG:0,16,0.3274,0.8775,124.9200,-17.13,0.55,[-17.125384797321388, 0.5535192436416749],1.0397,False,Tr

SIM_TRACE_LOG:0,17,0.2993,0.9118,125.7336,1.14,0.56,[1.1449007759598118, 0.5607351860641396],1.0988,False,True,

SIM_TRACE_LOG:0,18,0.2730,0.9422,126.5963,-0.50,0.45,[-0.4953503664246064, 0.45],1.0006,False,True,2.1836,2,33.

SIM_TRACE_LOG:0,19,0.2480,0.9699,127.4286,30.00,0.58,[30.0, 0.5797080501925032],1.0702,False,True,2.2958,3,33.2

SIM_TRACE_LOG:0,20,0.2151,1.0048,128.5977,0.45,0.60,[0.4529574714912208, 0.6],1.1618,False,True,2.4398,3,33.28,

SIM_TRACE_LOG:0,21,0.1910,1.0306,129.2067,-6.07,0.60,[-6.066883165367543, 0.6],1.1018,False,True,2.5459,3,33.28

SIM_TRACE_LOG:0,22,0.1565,1.0688,129.8061,-17.64,0.59,[-17.642144782139102, 0.5928320834766536],1.0955,False,Tr

SIM_TRACE_LOG:0,23,0.1314,1.1005,129.5828,-6.43,0.53,[-6.427786939049003, 0.530889381728802],1.0962,False,True,

SIM_TRACE_LOG:0,24,0.1058,1.1323,129.4580,-28.00,0.59,[-28.0, 0.592360831607806],1.1375,False,True,2.9423,3,33.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292

可以看到 robomaker docker 里面是 agent 每一步的详细数据

此时可以通过网页 8080 端口在线实时查看运行状态
http://ip:8080
在这里插入图片描述
在这里插入图片描述

4.4.2 sagemaker
sagemaker 是对每一个回合的数据汇总
在这里插入图片描述

4.4.3 rlcoach
rlcoach 是对agent每20回合之后进行的数据训练在这里插入图片描述
4.5 停止训练
停止训练的命令

dr-stop-training
  • 1

停止后查看docker ps,此时只剩 minio 一个实例

4.6 评估模型
评估模型的命令

dr-start-evaluation
  • 1

此时可以通过8180 端口网页实时查看agent 运行状态

4.7 停止评估模型
命令, 运行该命令后评估结束,此时又只剩下minio docker

dr-stop-evaluation
  • 1

4.8 迭代模型
命令,运行该命令后,模型名称最后面的数字+1

dr-increment-training
  • 1

4.9 更新参数
修改/home/rambo/deepracer-for-cloud/custom_files 里面的奖励函数,速度值等,需要将其更新到环境中,命令如下

dr-upload-custom-files
  • 1

懂得了这些基本命令就可以入门本地训练了,当然想要在本地玩好 deepracer 还有很多命令技巧和组合,已经自动化训练,数据分析,模型优化等,但懂得了本文的这些基本内容,入门已经足够了。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/197073
推荐阅读
相关标签
  

闽ICP备14008679号