Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOML-like setting groups/sections [Enchancement] #91

Open
pkubik opened this issue Nov 2, 2020 · 5 comments
Open

TOML-like setting groups/sections [Enchancement] #91

pkubik opened this issue Nov 2, 2020 · 5 comments

Comments

@pkubik
Copy link

pkubik commented Nov 2, 2020

Right now adding and removing new config values is quite tedious as we need to repeat the class/function name for each field:

MyClass.batch_size = 100
MyClass.num_epochs = 100
...

If the gin format resemble TOML so much, it would seem natural to introduce the section headers, i.e.:

[MyClass]
batch_size = 100
num_epochs = 100
...
@pkubik pkubik changed the title TOML-like setting groups/sections TOML-like setting groups/sections [Enchancement] Nov 2, 2020
@sguada
Copy link
Collaborator

sguada commented Nov 3, 2020

We have thought about this but never found a nice Pythonic way to implemented it. If you have suggestions and want to make a proposal, please do so.

@pkubik
Copy link
Author

pkubik commented Nov 3, 2020

Is there any issue where it was already discussed?

@sguada
Copy link
Collaborator

sguada commented May 10, 2021

We are working on a version that would allow using indentation to avoid repetition.

Scope/module.MyClass:
  batch_size = 100
  num_epochs = 100

#Equivalted to

Scope/module.MyClass.batch_size = 100
Scope/module.MyClass.num_epochs = 100

Staty tuned.

@marcospiau
Copy link

We are working on a version that would allow using indentation to avoid repetition.

Scope/module.MyClass:
  batch_size = 100
  num_epochs = 100

#Equivalted to

Scope/module.MyClass.batch_size = 100
Scope/module.MyClass.num_epochs = 100

Staty tuned.

Hi, @sguada. Is this currently working?

Thanks,
Marcos

@SlapDrone
Copy link

Would also love this :3

We are working on a version that would allow using indentation to avoid repetition.

Scope/module.MyClass:
  batch_size = 100
  num_epochs = 100

#Equivalted to

Scope/module.MyClass.batch_size = 100
Scope/module.MyClass.num_epochs = 100

Staty tuned.

Would love this.

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

No branches or pull requests

4 participants