Skip to content

Add verbose flag to DeepRacerLog init and load methods#73

Merged
larsll merged 4 commits into
devfrom
copilot/add-verbose-flag-logpy
Mar 22, 2026
Merged

Add verbose flag to DeepRacerLog init and load methods#73
larsll merged 4 commits into
devfrom
copilot/add-verbose-flag-logpy

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 22, 2026

DeepRacerLog provided no feedback during initialization or log loading, making it hard to confirm what was detected and loaded without inspecting the dataframe manually.

Changes

  • __init__(verbose=False) — stores verbose as self.verbose; prints the folder type selected by determine_root_folder_type() when True
  • load_training_trace() — prints step/episode/iteration counts after load using self.verbose; uses unique_episode for correct multi-worker counting
  • load_evaluation_trace() — prints step/episode/iteration counts after load using self.verbose
  • load_robomaker_logs() — prints step/episode/iteration counts after load using self.verbose
  • load() — delegates to the underlying load method which reads self.verbose
  • _print_load_summary() — private helper extracted to avoid duplication across load methods

The verbose flag is set once on the constructor and applies to all subsequent load operations. All existing call sites are unaffected as it defaults to False.

Example

drl = DeepRacerLog("./my-model", verbose=True)
# Folder type detected: DROA_SOLUTION_LOGS

drl.load_training_trace(ignore_metadata=True)
# Loaded training trace: 846 steps, 40 episodes, 2 iterations
Original prompt

This section details on the original issue you should resolve

<issue_title>Add a verbose flag to key functions in log.py / DeepRacerLog</issue_title>
<issue_description>Needed feature:

  • During initialization the self.fh.determine_root_folder_type() should output what it selected.
  • During the load_*_trace() and load_robomaker_logs() a brief summary should be added (X steps, Y episodes, Z iterations).</issue_description>

<agent_instructions>Verbose flag should default to False. Ensure documentation and test cases are updated.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

Copilot AI changed the title [WIP] Add verbose flag to key functions in log.py Add verbose flag to DeepRacerLog init and load methods Mar 22, 2026
Copilot AI requested a review from larsll March 22, 2026 09:33
@larsll larsll changed the base branch from master to dev March 22, 2026 09:37
@larsll larsll marked this pull request as ready for review March 22, 2026 09:38
@larsll
Copy link
Copy Markdown
Member

larsll commented Mar 22, 2026

@copilot let's simplify it -- just pass verbose on the constructor (init), then store the result for all other function calls. You can then revert changes in many of the function calls.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 22, 2026

@copilot let's simplify it -- just pass verbose on the constructor (init), then store the result for all other function calls. You can then revert changes in many of the function...

Done in commit 1cb4965. verbose is now only accepted by __init__ and stored as self.verbose. All load methods (load(), load_training_trace(), load_evaluation_trace(), load_robomaker_logs()) have had their verbose parameter removed and use self.verbose internally instead.

Copilot AI requested a review from larsll March 22, 2026 09:46
@larsll larsll merged commit d71e7c8 into dev Mar 22, 2026
larsll added a commit that referenced this pull request Mar 22, 2026
* Initial plan

* Add verbose flag to DeepRacerLog init and load methods

Co-authored-by: larsll <59617571+larsll@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aws-deepracer-community/deepracer-utils/sessions/084d2922-1fbf-4f01-8d5c-439ab6a5a1b1

* Simplify verbose: store on __init__, remove from load method signatures

Co-authored-by: larsll <59617571+larsll@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aws-deepracer-community/deepracer-utils/sessions/7b4896b1-6e97-44c6-bff7-05d73212ec9d

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: larsll <59617571+larsll@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a verbose flag to key functions in log.py / DeepRacerLog

2 participants