Skip to content

Python crashes when training. #5229

@George056

Description

@George056

When training I receive an error but training continues, but python then crashes after training continues for a few minutes. Also, the summery folder is not generated and the obtained reward is not printed. I am having this bug on my custom environment that is using discrete actions and is manually being called. My training configuration follows.

behaviors:
    Node_AI:
        trainer_type: sac
        summary_freq: 50000
        time_horizon: 128
        max_steps: 5.0e6
        keep_checkpoints: 5
        checkpoint_interval: 500000
        init_path: null
        threaded: true
        hyperparameters:
            learning_rate: 3e-4
            batch_size: 100 #this is a guess avg is 32 - 512
            buffer_size: 50000
            learning_rate_schedule: constant
            buffer_init_steps: 0
            init_entcoef: 0.5
            save_replay_buffer: true
            tau: 0.005
            steps_per_update: 1
        network_settings:
            hidden_units: 256
            num_layers: 2 #typical is 1 - 3
            normalize: false
            vis_encoder_type: match3
        reward_signals:
            extrinsic:
                gamma: 0.99
                strength: 1.0
            curiosity:
                strength: 0.05
                gamma: 0.99
        self_play:
            save_steps: 20000
            team_change: 80000
            swap_steps: 5000
            play_against_latest_model_ratio: 0.5
            window: 10
c:\users\capstone\.conda\envs\ml-agents-node\lib\site-packages\mlagents\trainers\torch\utils.py:242: UserWarning: This overload of nonzero is deprecated:
nonzero()
Consider using one of the following signatures instead:
nonzero(*, bool as_tuple) (Triggered internally at ..\torch\csrc\utils\python_arg_parser.cpp:882.)
res += [data[(partitions == i).nonzero().squeeze(1)]]
  • Unity Version: 2020.2.3f1
  • OS + version: Windows 10
  • ML-Agents version: 0.23
  • Torch version: 1.7.1

Metadata

Metadata

Assignees

Labels

bugIssue describes a potential bug in ml-agents.staleIssues that have been idle for a while. Automatically closed by a bot if idle for too long.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions