Giter VIP home page Giter VIP logo

deepracer-pirates-log-analysis's Introduction

deepracer-pirates-log-analysis

We built custom interactive graphs using plotly graphing library on top of basic log-analysis provided by the community

Log Analysis Features

  • Accommodated the new log folder structure that we download from console.
  • Accomodated log-analysis for DRFC trainings with multiple robomakers streamed from cloud watch.
  • Accomodated log-analysis for DRFC trainings with multiple robomakers inside the EC2 instance itself.
  • For local and DRFC trainings, added reward-progress distribution over iterations as seen on deepracer console.
  • Added entropy and surrogate loss graphs.
  • Added graphs to provide insights on First n% and Last n% of the training data (works with both simulation_agg and complete_ones dataframes).
  • All the plotly functions are present in plotly_graph_utils.py. Feel free to make changes to according to your requirement.
  • Added Custom Logging Feature
  • Added Object Avoidance Plot

Custom Logging

Ex : print("PIRATES_TRACE_LOG:%f;%f;%s;%s;%f" % (botx, boty, objects_location, objects_distance,reward_avoid))

Note : Please use delimiter as ; since array logs are printed using ,

  • Add the print statement in your reward function for variables or arrays that are you would like to later analyse.
  • Use a logger-prefix as shown in the example (not necessarily the same).
  • In the Training_analysis_with_custom_logging Notebook, configure the properties - logger_prefix, custom_headers, array_headers.
  • The Notebook Auto detects the data_type of all the fields, with an exception of arrays. Hence you'll have specify the array_headers from custom_headers as shown in the Notebook so that they can be properly parsed.
  • The given example in the Notebook is useful to plot objects on the track for log-analysis.

Note : If you are logging too many custom arrays, it would increase the log-file size and also the time to parse the arrays. Disable custom_config when it is not necessary. (This was quickly developed before 2020 Championship Finals for OA and H2H analysis. Haven't found time to optimize it).

Track Generation from Waypoints

  • A Utility to generate new tracks using waypoints that deepracer provides.

Automated Tools

  • Use either the python file (preferred) or the notebook to submit multiple models to multiple races.

Usage of Auto Submission Tool :

  • The tool runs on mozilla firefox - init_mozilla_selenium() or google chrome - init_chrome_selenium() using selenium. (Mozilla - runs in headless)
  • Download web driver from https://chromedriver.chromium.org/ for your version of chrome or geckodriver for Mozilla.
  • Log in to your AWS Account and close the browser.
  • Replace the below variables in the script (Similar process for Mozilla):
    1. The first argument points to the Default profile in chrome. You can find yours by hitting chrome://version in your chrome browser.
    2. The second argument is the path to the chrome driver.
      options.add_argument("--user-data-dir=C:/Users/Rogue/AppData/Local/Google/Chrome/User Data") webdriver.Chrome(executable_path="C:\\Users\\Rogue\\Downloads\\Compressed\\chromedriver", chrome_options=options)
  • Define your race link/s and model list(refer script on how to). The script supports submissions to multiple races and multiple models to single race in succession.
  • The Race Times for each model in each iteration are logged in logRaceTimes-{timestamp}.txt. (You can make it csv if you'd like by not printing the iteration number)

Usage of Automated Deletion Tool :

  • deleteModels.py helps in deleting all the models created in the account.
  • Configure the selenium driver for mozilla firefox - init_mozilla_selenium() or google chrome - init_chrome_selenium() in the python file as stated above and run the script.
  • Deletion logs are recorded in the file delete-{timestamp}.log

References :

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.