gin-config icon indicating copy to clipboard operation
gin-config copied to clipboard

TOML-like setting groups/sections [Enchancement]

Open pkubik opened this issue 4 years ago • 5 comments

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 avatar Nov 02 '20 20:11 pkubik

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.

sguada avatar Nov 03 '20 10:11 sguada

Is there any issue where it was already discussed?

pkubik avatar Nov 03 '20 10:11 pkubik

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.

sguada avatar May 10 '21 03:05 sguada

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

marcospiau avatar Apr 05 '23 19:04 marcospiau

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.

SlapDrone avatar Jul 25 '23 14:07 SlapDrone