question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to add new config parameters

See original GitHub issue

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • Ray installed from (source or binary): pip install ray
  • Ray version:
  • Python version: 3.6.5
  • Exact command to reproduce: python train_ppo.py

Describe the problem

I am trying to train sonic-on-ray here When I execute python train_ppo.py, ray.rllib.utils.init gives me:

raise Exception("Unknown config parameter `{}` ".format(k))

for everything NEW inside config.update( { } ). I tried config[newKey] = value, nothing seems to allow me to add new keys.

  1. How do I set new_keys_allowed to True? In agent.py _allow_unknown_configs is set to False. Am I suppose to modify this to True? And if I didn’t install ray from source, how would I change that?
  2. And what is the up-to-date syntax on updating config using config.update(dict)? I tried looking at the documentation I’m wondering is "timesteps_per_batch" or sgd_stepsize changed under a different name? Since these keys are no longer under the DEFAULT_CONFIG inside either agent.py or ppo.py If so, what are the new names for these keys? or can someone from ray update the sonic-on-ray repo?

As always, thanks a lot

Source code / logs

Created LogSyncer for /home/peng00/ray_results/PPO_sonic_env_2018-10-29_22-07-56i9zwqmz5 -> None
Traceback (most recent call last):
  File "train_ppo.py", line 65, in <module>
    alg = ppo.PPOAgent(config=config, env=env_name)
  File "/home/peng00/miniconda3/envs/sonic/lib/python3.6/site-packages/ray/rllib/agents/agent.py", line 216, in __init__
    Trainable.__init__(self, config, logger_creator)
  File "/home/peng00/miniconda3/envs/sonic/lib/python3.6/site-packages/ray/tune/trainable.py", line 84, in __init__
    self._setup()
  File "/home/peng00/miniconda3/envs/sonic/lib/python3.6/site-packages/ray/rllib/agents/agent.py", line 253, in _setup
    self._allow_unknown_subkeys)
  File "/home/peng00/miniconda3/envs/sonic/lib/python3.6/site-packages/ray/rllib/utils/__init__.py", line 35, in deep_update
    raise Exception("Unknown config parameter `{}` ".format(k))
Exception: Unknown config parameter `timesteps_per_batch` 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ericlcommented, Oct 30, 2018

That would be sample_batch_size.

On Tue, Oct 30, 2018 at 1:09 PM jhpenger notifications@github.com wrote:

Yep, that looks right to me! … <#m_2581864536168091198_>

On Tue, Oct 30, 2018, 12:47 PM jhpenger @.***> wrote: Thanks for the info. Just to make sure, is this the correct translation to the current ray version? - timesteps_per_batch = train_batch_size - sgd_stepsize = lr — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <#3160 (comment) https://github.com/ray-project/ray/issues/3160#issuecomment-434443299>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA6SgBENZ6i_mKW1-P5ZxPDBmL6C6Ehks5uqKy5gaJpZM4YAvtm .

@ericl https://github.com/ericl , sorry i updated the comment, can’t figure out what min_steps_per_task is

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/ray-project/ray/issues/3160#issuecomment-434450856, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA6Sju3xNqIQWQiDLpip__Rt0kiHEzDks5uqLHhgaJpZM4YAvtm .

0reactions
jhpengercommented, Oct 30, 2018

Yep, that looks right to me! On Tue, Oct 30, 2018, 12:47 PM jhpenger @.***> wrote: Thanks for the info. Just to make sure, is this the correct translation to the current ray version? - timesteps_per_batch = train_batch_size - sgd_stepsize = lr — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <#3160 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA6SgBENZ6i_mKW1-P5ZxPDBmL6C6Ehks5uqKy5gaJpZM4YAvtm .

@ericl , sorry i updated the comment, can’t figure out what min_steps_per_task is

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable To Add Value To Custom App.Config Section
When the user goes to add a new key the the "servers" section, it throws the below exception. System.Configuration.ConfigurationErrorsException: ...
Read more >
Unable to edit account settings or add a new view
To edit account settings or add a new view, you need to have the Editor role. If you do not have this permission...
Read more >
Create and edit configurations - Visual Studio (Windows)
Learn how you can use Visual Studio to create and edit several build configurations for your solution.
Read more >
Fix 'Unable to write into user settings" | Visual Studio Code
Getting an annoying error whenever you're changing settings in Visual Studio Code (VS Code)? Well, this video shows you how things might be ......
Read more >
Edit the Configuration File Parameters in the VMware Host ...
In the Configuration Parameters row, click Edit Configuration. The Configuration Parameters dialog box opens. (Optional) To add a parameter, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found