Skip to content

Releases: aphp/confit

v0.9.0

08 Jul 10:58
f7e23a7
Compare
Choose a tag to compare

Changelog

  • Fix calling @validate_arguments on classes with wrapped __init__ functions (e.g. accelerate loggers)
  • Enforce auto_draft_in_config parameter when a function is imported via entry points (i.e., apply precedence to function passed to Registry.register, instead of the one got from the entry point)
  • Add default_config option in CLI decorator

What's Changed

  • feat: add default config option in CLI by @Thomzoy in #38
  • fix: support @validate_arguments on classes with wrapped init by @percevalw in #37

Full Changelog: v0.8.0...v0.9.0

v0.8.0

15 Apr 14:45
Compare
Choose a tag to compare

Changelog

  • Added auto_draft_in_config parameter to register(...) function. This is meant for functions that can only be partially be instantiated by a user, because a required parameter will be provided by the library later.

    For instance:

    • EDS-NLP's ScheduledOptimizer requires the pipeline parameters, which depends on the pipeline being trained
    • EDS-NLP's local trackers (like csv and json) require logging_dir which might be defined in the edsnlp.train function.

    If a callable registered with auto_draft_in_config=True is resolved with missing required parameters, a Draft[ReturnType] class is returned.
    This class can then be instantiated via the draft.instantiate method.
    We don't instantiate a Draft class via the __call__ method to avoid users mistakenly proceeding with a non instantiated class.
    Instead, whenever a Draft an attribute or a method is requested on Draft class, outside the Draft few specific attrs/methods,
    a message error is displayed explaining how this object is not instantiated yet.

    The user can also explicitly instantiate the Draft object via the Class.draft method for classes that have been wrapped with validate_arguments.

  • Added a Validatable class that can be inherited from to run a validate class method whenever the class is validated

Pull Requests

Full Changelog: v0.7.5...v0.8.0

v0.7.5

21 Mar 13:09
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.7.4...v0.7.5

v0.7.4

15 Jan 09:11
Compare
Choose a tag to compare

Changelog

  • Allow larger than 4096 bytes config files
  • Escape tabs and newline when serializing to a config file
  • Fix an infinite loop that occured when resolving a reference to a field with a null value

Pull Requests

  • Fix/issue 26 : YAML Parsing for Large Config Files by @LucasDedieu in #28
  • Fix: escape tabs and newline when serializing to a config file by @percevalw in #29
  • Support reference to fields with null values by @percevalw in #30
  • chore: bump version to 0.7.4 by @percevalw in #31

New Contributors

Full Changelog: v0.7.3...v0.7.4

v0.7.3

12 Dec 13:19
Compare
Choose a tag to compare

Changelog

  • Support interpolated seed in the config file (as a reminder, the seed is treated specifically by confit to initialize random generators before any object is resolved)
  • Support if/else expressions in interpolation, and only resolve the relevant branch

Pull Requests

Full Changelog: v0.7.2...v0.7.3

v0.7.2

28 Nov 15:24
Compare
Choose a tag to compare

Changelog

  • Seed the program BEFORE the config file is resolved and components have been instantiated, to ensure reproducibility.

Pull Request

Full Changelog: v0.7.1...v0.7.2

v0.7.1

21 Nov 11:19
Compare
Choose a tag to compare

Changelog

  • Force utf-8 encoding when writing a config file (ini or yaml)

Pull Requests

Full Changelog: v0.7.0...v0.7.1

v0.7.0

22 Oct 18:23
Compare
Choose a tag to compare

Changelog

Changed

  • Aborting a script will now show the traceback

Fixed

  • Confit should no longer cause pydantic v1 deprecation warnings

Pull Requests

Full Changelog: v0.6.0...v0.7.0

v0.6.0

13 Sep 13:50
02a1178
Compare
Choose a tag to compare

Changelog

Fixed

  • Support IPython autoreload on confit wrapped functions
  • Support using config files with scripts without a dedicated section header
  • Disable configparser interpolation (% symbol)
  • Better support for escaped strings in config files
  • Various registry-related fixes

Added

  • Non-relevant fields (outside the script dedicated section) are no longer instantiated when running a script with a config file
  • We now support loading and serializing configs in yaml syntax (Confit.from_yaml_str, Confit.to_yaml_str, Confit.from_disk("___.yaml") and Confit.to_disk("___.yaml"))

Pull Requests

Full Changelog: v0.5.6...v0.6.0

v0.5.6

31 Jan 16:18
Compare
Choose a tag to compare

No change from v0.5.5.
Package is now distributed as source and wheel.

Full Changelog: v0.5.5...v0.5.6