Giter Club home page Giter Club logo

Comments (1)

OverLordGoldDragon avatar OverLordGoldDragon commented on May 27, 2024

Subclassing ArgumentTracer(abc.ABCMeta) in hyperparameter_hunter.tracers.py, then applying the following fixes yields the error shown toward bottom -- also shown output for print(self.name) inserted right above the breaking code.


# keras_helper.py
# AttributeError: 'LossFunctionWrapper' object has no attribute '__name__'
try:
    compile_params["loss_function_names"] = [_.__name__ for _ in compile_params["loss_functions"]]
except:
    compile_params["loss_function_names"] = [_.name for _ in compile_params["loss_functions"]]

# AttributeError: 'Sequential' object has no attribute 'weighted_metrics'
try:
    compile_params["weighted_metrics"] = get_keras_attr(model, "weighted_metrics")
except:
    print('WARNING: could not fetch "weighted_metrics" attribute; skipping...')

Full error trace:

total:0 # print(self.name) outputs
count:0
UnreadVariable

Traceback (most recent call last):

  File "<ipython-input-1-1226ec5313a7>", line 56, in <module>
    execute()
  File "<ipython-input-1-1226ec5313a7>", line 49, in execute
    shuffle=True,
  File "C:\hyperparameter_hunter\hyperparameter_hunter\experiment_core.py", line 165, in __call__
    return super().__call__(*args, **kwargs)
  File "C:\hyperparameter_hunter\hyperparameter_hunter\experiments.py", line 749, in __init__
    target_metric=target_metric,
  File "C:\hyperparameter_hunter\hyperparameter_hunter\experiments.py", line 595, in __init__
    target_metric=target_metric,
  File "C:\hyperparameter_hunter\hyperparameter_hunter\experiments.py", line 302, in __init__
    self.preparation_workflow()
  File "C:\hyperparameter_hunter\hyperparameter_hunter\experiments.py", line 354, in preparation_workflow
    self._generate_hyperparameter_key()
  File "C:\hyperparameter_hunter\hyperparameter_hunter\experiments.py", line 450, in _generate_hyperparameter_key
    self.hyperparameter_key = HyperparameterKeyMaker(parameters, self.cross_experiment_key)
  File "C:\hyperparameter_hunter\hyperparameter_hunter\keys\makers.py", line 367, in __init__
    KeyMaker.__init__(self, parameters, **kwargs)
  File "C:\hyperparameter_hunter\hyperparameter_hunter\keys\makers.py", line 90, in __init__
    self.parameters = deepcopy(parameters)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 215, in _deepcopy_list
    append(deepcopy(a, memo))
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 215, in _deepcopy_list
    append(deepcopy(a, memo))
  File "D:\Anaconda\envs\test_hh\lib\copy.py", line 161, in deepcopy
    y = copier(memo)
  File "D:\Anaconda\envs\test_hh\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py", line 464, in __deepcopy__
    name=self._shared_name + "_copy",
  File "D:\Anaconda\envs\test_hh\lib\site-packages\tensorflow_core\python\ops\variables.py", line 1155, in _shared_name
    return self.name[:self.name.index(":")]

ValueError: substring not found

from hyperparameter_hunter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.