Closed hep-beginner closed 4 years ago
Welcome to Talos community! Thanks so much for creating your first issue :)
Thanks, good sleuthing :) This is not so straightforward matter unfortunately. It was handled in this commit by using OrderedDict
at the earliest point. Will have to think a little bit, but might be resolved by bringing it back.
Dear mikkokotila, Many thanks for the reply. Sorry for my too simple thinking. I decide to move to python 3.6 and that version works well with talos. This is a very nice and easy to use package.
Closing here as its resolved.
The issue is still relevant, unfortunately. I tried to wrap my params into an OrderedDict
, but the order of columns is still incorrect (python 3.5). It seems that talos doesn't support python3.5 at this point which is sad...
It it helps, there is the following observation:
If I print a params object from my one-train (one-round) function, the order of params matches the order of the columns in the resulted scan object.
The order of columns, on the other hand, is alphabetical.
The root of this problem is, naturally, the fact that in python <=3.5 the order of dicts is arbitrary while starting from 3.6 the insertion order is preserved (starting from 3.7 it is in the standard).
Hello, I would like to report a issue I found with the talos package output of the CSV with my current solution. My python version is python 3.5.2 (default, Oct 8 2019, 13:06:37) on the WSL and the keras is together with TF2.0 in which the model itself works. My
talos.__version__
prints '0.6.3' and it is installed via pip. I ran the code converted from the example:The output CSV looks like
for an example. During differenc trials, the titles always keep the same and the values of the parameters part can go wrong in arbitrary orders. After I investigate the code, I have found that in the talos/logging/results.py L21, the looping takes the key of self.round_params and this is a dictionary defined in talos/parameters/ParamSpace.py L187. Changing the looping item into the sorted fixed order list object self._param_dict_keys can solve the problem. According to some brief searching, it seems keep the default order of dictionary is a feature added in python 3.6 and I tested in my python 3.5.2 that it was really the case that the dictionary entries order is not fixed to the default. I hope this change do not cause any potential risks to the packages. Thanks a lot.