From 5abc7e05b180cf241411ea9f030bf7f0370eb53e Mon Sep 17 00:00:00 2001 From: Tackoil Date: Tue, 25 Oct 2022 10:48:11 +0800 Subject: [PATCH 1/2] feat: support `in` operation in ConfigParser --- parse_config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parse_config.py b/parse_config.py index 309f153e..e05dc258 100644 --- a/parse_config.py +++ b/parse_config.py @@ -111,6 +111,10 @@ def __getitem__(self, name): """Access items like ordinary dict.""" return self.config[name] + def __contains__(self, name): + """Use in operation like ordinary dict.""" + return name in self.config + def get_logger(self, name, verbosity=2): msg_verbosity = 'verbosity option {} is invalid. Valid options are {}.'.format(verbosity, self.log_levels.keys()) assert verbosity in self.log_levels, msg_verbosity From 466f0a28b7ac5ae6511f8d38994c5357d3463211 Mon Sep 17 00:00:00 2001 From: HernandoR <45709656+HernandoR@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:48:14 +0800 Subject: [PATCH 2/2] Hot fix guild line in read me --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 06ffc303..e586b4bc 100644 --- a/README.md +++ b/README.md @@ -355,6 +355,9 @@ If you need more visualizations, use `add_scalar('tag', data)`, `add_image('tag' **Note**: You don't have to specify current steps, since `WriterTensorboard` class defined at `logger/visualization.py` will track current steps. +**known issue**: when using numpy>=1.24 and pytorch <=1.13 may encontered Type error: No loop matching the specified signature and casting was found for ufunc greater which will fixed by following update of pytorch. + +one fix is to install the pkg from source, since it has been fixed in source just havent released yet. another if following this hot fix that modify the torch/utils/tensorboard/summary.py from cum_counts = np.cumsum(np.greater(counts, 0, dtype=np.int32)) to cum_counts = np.cumsum(np.greater(counts, 0)) one can find the pkg source by clicking the import line in vscode ## Contribution Feel free to contribute any kind of function or enhancement, here the coding style follows PEP8