Commit 6d973af4 authored by Benjamin's avatar Benjamin
Browse files

lint code

parent 3eb03b8d
import json
import math
import os
from typing import Dict, Any, TextIO
from mlagents.trainers.exception import (
CurriculumConfigError,
CurriculumLoadingError,
CurriculumError,
)
from mlagents.trainers.curriculum import Curriculum
......
"""Contains the MetaCurriculum class."""
import os
from typing import Dict, Set
from typing import Dict
from mlagents.trainers.meta_curriculum import MetaCurriculum
from mlagents.trainers.exception import MetaCurriculumError
from animalai_train.curriculum_aai import CurriculumAAI
......
from typing import NamedTuple, Dict, Optional, List
from typing import NamedTuple, Dict, Optional
from animalai.envs.arena_config import ArenaConfig
......@@ -38,7 +38,7 @@ class RunOptionsAAI(NamedTuple):
keep_checkpoints: How many model checkpoints to keep
base_port: Base port for environment communication
num_envs: Number of parallel environments to use for training
curriculum_config: Path to curriculum training folder
curriculum_config: Path to curriculum training folder
lesson: Start learning from this lesson if using curriculum
multi_gpu: Whether or not to use multiple GPU (not in current version)
cpu: Run with CPU only
......
from typing import Dict, List, Optional
from typing import Dict, List
from mlagents.trainers.env_manager import EnvironmentStep
from mlagents.trainers.simple_env_manager import SimpleEnvManager
......
from mlagents.trainers.trainer_util import load_config
from animalai.envs.arena_config import ArenaConfig
from animalai_train.run_options_aai import RunOptionsAAI
from animalai_train.run_training_aai import run_training_aai
# TODO: add SAC trainer or maybe add directly to train_ml_agents.py
# trainer_config_path = "configurations/training_configurations/train_ml_agents_config.yaml"
# environment_path = "env/AnimalAI"
# arena_config_path = "configurations/arena_configurations/train_ml_agents_arenas.yml"
# run_id = "train_ml_agents"
# base_port = 5005
# number_of_environments = 4
# number_of_arenas_per_environment = 8
#
# args = RunOptionsAAI(
# trainer_config=load_config(trainer_config_path),
# env_path=environment_path,
# run_id=run_id,
# base_port=base_port,
# num_envs=number_of_environments,
# arena_config=ArenaConfig(arena_config_path),
# n_arenas_per_env=number_of_arenas_per_environment,
# )
#
# run_training_aai(0, args)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment