Skip to content

Resolve default values for Options #1014

@TomAugspurger

Description

@TomAugspurger

Over in rapidsai/cudf#22365, we're attempting to record the configuration options actually used by a cudf-polars benchmark run. Previously, cudf-polars managed ~all the options in a cudf_polars.utils.config.ConfigOptions dataclass, with default values resolved upon initialization, so the actual values used at runtime were easily accessible.

cudf-polars new frontends split options across different categories, including a rapidsmpf.config.Options() object. I'd like a way to get the values actually used at runtime, so it can be serialized and recorded for posterity.

Doing this will require a few changes, I think:

  1. Define the default values centrally, on Options; instead of doing something like options.insert_if_absent(name, default_value) at a call site, the Options object would define the default value and the call site would use that instead of inserting it if absent
  2. (possibly a direct consequence of the first change): Options.get_strings() needs to return all the options, not just those that have been used.

And as an aside, it'd be nicer to get the actual values (int, bool, float, string) instead of just strings, if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions