mirror of
https://github.com/clearml/clearml
synced 2025-03-03 10:42:00 +00:00
Fix task.get_user_properties when called with value_only=True
This commit is contained in:
parent
2e6e0c1a1d
commit
90354a7751
@ -42,7 +42,6 @@ class HyperParams(object):
|
||||
selector and not selector(item)
|
||||
):
|
||||
continue
|
||||
item = item if not projector else projector(item)
|
||||
if return_obj:
|
||||
item = tasks.ParamsItem()
|
||||
hyperparams[item.get("section")][item.get("name")] = (
|
||||
|
@ -8,7 +8,6 @@ import threading
|
||||
import time
|
||||
from argparse import ArgumentParser
|
||||
from logging import getLogger
|
||||
from operator import attrgetter
|
||||
from tempfile import mkstemp, mkdtemp
|
||||
from zipfile import ZipFile, ZIP_DEFLATED
|
||||
|
||||
@ -2180,7 +2179,7 @@ class Task(_Task):
|
||||
section = "properties"
|
||||
|
||||
params = self._hyper_params_manager.get_hyper_params(
|
||||
sections=[section], projector=attrgetter("value") if value_only else None
|
||||
sections=[section], projector=(lambda x: x.get("value")) if value_only else None
|
||||
)
|
||||
|
||||
return dict(params.get(section, {}))
|
||||
|
Loading…
Reference in New Issue
Block a user