Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.ml-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to
#### ml-agents / ml-agents-envs
- Fixed a bug when using LSTM and SAC where the buffer might contain non-integer numbers of sequences. (#6301)
- Fixed mixed CPU/GPU computation by ensuring tensors share a consistent device in the trainer; Updated training devices. (#6303)
- Fix typing on optional strings (#6311)

#### Examples
- Replace hardcoded value 200f by agentRotationSpeed in MoveAgent() (#6306)
Expand Down
5 changes: 4 additions & 1 deletion ml-agents-envs/mlagents_envs/timers.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def add_time(self, elapsed: float) -> None:
self.count += 1

def merge(
self, other: "TimerNode", root_name: str = None, is_parallel: bool = True
self,
other: "TimerNode",
root_name: Optional[str] = None,
is_parallel: bool = True,
) -> None:
"""
Add the other node to this node, then do the same recursively on its children.
Expand Down
3 changes: 2 additions & 1 deletion ml-agents/mlagents/trainers/directory_utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import os
from typing import Optional
from mlagents.trainers.exception import UnityTrainerException
from mlagents.trainers.settings import TrainerSettings
from mlagents.trainers.model_saver.torch_model_saver import DEFAULT_CHECKPOINT_NAME


def validate_existing_directories(
output_path: str, resume: bool, force: bool, init_path: str = None
output_path: str, resume: bool, force: bool, init_path: Optional[str] = None
) -> None:
"""
Validates that if the run_id model exists, we do not overwrite it unless --force is specified.
Expand Down
4 changes: 2 additions & 2 deletions ml-agents/mlagents/trainers/trainer/trainer_factory.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from typing import Dict
from typing import Dict, Optional

from mlagents_envs.logging_util import get_logger
from mlagents.trainers.environment_parameter_manager import EnvironmentParameterManager
Expand All @@ -23,7 +23,7 @@ def __init__(
load_model: bool,
seed: int,
param_manager: EnvironmentParameterManager,
init_path: str = None,
init_path: Optional[str] = None,
multi_gpu: bool = False,
):
"""
Expand Down
Loading