You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #603 (comment), @bdice raised an issue that I also ran into with the kvikio.defaults system. We have three methods per option, typically:
kvikio.defaults.<option>
kvikio.defaults.set_<option>
kvikio.defaults.<option>_reset
It wasn't initially clear to me which of set_<option> and <option>_reset is method that immediately sets the value, and which is the one that must be used as a context manager. And I still mix it up occasionally.
I like the way donfig, which was based on the Dask config system, combines that into a single object that handles both immediately setting the value and is usable as a context manager.
>>>kvikio.defaults.set({option: value}) # set it permenantly>>>withkvikio.defaults.set({option: value}): ... # set it for the lifetime of the context manager
The text was updated successfully, but these errors were encountered:
I think DriverProperties has already been made pretty Pythonic with the @property decorator. Is this what you have in mind as further improvement? @madsbk
# Only allow non-read-only properties to be set this waywithkvikio.cufile_driver.set({"poll_mode": True, "max_device_cache_size": 4096})
In #603 (comment), @bdice raised an issue that I also ran into with the
kvikio.defaults
system. We have three methods per option, typically:kvikio.defaults.<option>
kvikio.defaults.set_<option>
kvikio.defaults.<option>_reset
It wasn't initially clear to me which of
set_<option>
and<option>_reset
is method that immediately sets the value, and which is the one that must be used as a context manager. And I still mix it up occasionally.I like the way donfig, which was based on the Dask config system, combines that into a single object that handles both immediately setting the value and is usable as a context manager.
The text was updated successfully, but these errors were encountered: