Git Product home page Git Product logo

Comments (6)

MattForshaw avatar MattForshaw commented on September 24, 2024 2

Hello @adrienpetralia @boniolp,

Thank you so much for your rapid response. I really appreciate your help.

I can confirm I'm able to run everything as expected, so I'll do the honours and close out the issue.

Thanks again and have a great week!

Best wishes,
Matt

from appliancedetectionbenchmark.

boniolp avatar boniolp commented on September 24, 2024 1

Hi Matt,

Thanks a lot for all these comments/feedback.
We will have a look at all these issues and come back to you!

Best,

Paul

from appliancedetectionbenchmark.

MattForshaw avatar MattForshaw commented on September 24, 2024 1

Hi Adrien,

Thank you very much for all your help and for making those changes; it's very much appreciated.

I am now in a position (I think) where I can run the UKDALE experiments successfully, presuming some of the edits I document below are correct.

Best wishes,
Matt

utils -> Utils

  • Subdirectory src/utils had ot be renamed to src/Utils to allow Python to resolve the module.

sklearn should be replaced by scikit-learn in requirements.txt

Collecting sklearn
  Using cached sklearn-0.0.post5.tar.gz (3.7 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
      rather than 'sklearn' for pip commands.
      
      Here is how to fix this error in the main use cases:
      - use 'pip install scikit-learn' rather than 'pip install sklearn'
      - replace 'sklearn' by 'scikit-learn' in your pip requirements files
        (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
      - if the 'sklearn' package is used by one of your dependencies,
        it would be great if you take some time to track which package uses
        'sklearn' instead of 'scikit-learn' and report it to their issue tracker
      - as a last resort, set the environment variable
        SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
      
      More information is available at
      https://github.com/scikit-learn/sklearn-pypi-package
      
      If the previous advice does not cover your use case, feel free to report it at
      https://github.com/scikit-learn/sklearn-pypi-package/issues/new
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip

numba package needs to be added to requirements.txt

/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/venv/bin/python /Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/CER_Benchmark.py cooker_case Rocket 
Traceback (most recent call last):
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/venv/lib/python3.7/site-packages/sktime/utils/validation/_dependencies.py", line 140, in _check_soft_dependencies
    pkg_ref = import_module(package_import_name)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'numba'

The above exception was the direct cause of the following exception:
  
Traceback (most recent call last):
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/CER_Benchmark.py", line 114, in <module>
    clf_arsenal = Arsenal(n_jobs=-1)
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/venv/lib/python3.7/site-packages/sktime/classification/kernel_based/_arsenal.py", line 159, in __init__
    super(Arsenal, self).__init__()
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/venv/lib/python3.7/site-packages/sktime/classification/base.py", line 94, in __init__
    _check_estimator_deps(self)
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/venv/lib/python3.7/site-packages/sktime/utils/validation/_dependencies.py", line 386, in _check_estimator_deps
    pkg_deps_ok = _check_soft_dependencies(*pkg_deps, severity=severity, obj=obj)
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/venv/lib/python3.7/site-packages/sktime/utils/validation/_dependencies.py", line 165, in _check_soft_dependencies
    raise ModuleNotFoundError(msg) from e
    ModuleNotFoundError: Arsenal requires package 'numba' to be present in the python environment, but 'numba' was not found. 'numba' is a soft dependency and not included in the base sktime installation. Please run: `pip install numba` to install the numba package. To install all soft dependencies, run: `pip install sktime[all_extras]`

Process finished with exit code 1

BOSSEnsemble not defined

/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/venv/bin/python /Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/CER_Benchmark.py cooker_case Rocket 
Traceback (most recent call last):
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/CER_Benchmark.py", line 125, in <module>
    clf_eboss = BOSSEnsemble(n_jobs=-1)
NameError: name 'BOSSEnsemble' is not defined

Process finished with exit code 1
  • Update REFIT_Benchmark.py:L10 to from sktime.classification.dictionary_based import IndividualBOSS, ContractableBOSS, BOSSEnsemble
  • Update CER_Benchmark.py:L10 to from sktime.classification.dictionary_based import IndividualBOSS, ContractableBOSS, BOSSEnsemble
  • Update UKDALE_Benchmark.py:L10 to from sktime.classification.dictionary_based import IndividualBOSS, ContractableBOSS, BOSSEnsemble

REFIT variable h not defined

/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/venv/bin/python /Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/REFIT_Benchmark.py 
Traceback (most recent call last):
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/REFIT_Benchmark.py", line 221, in <module>
    path_res_n_houses = create_dir(path_res + str(h) + '_houses' + os.sep)
NameError: name 'h' is not defined

Process finished with exit code 1

In path_res_n_houses = create_dir(path_res + str(h) + '_houses' + os.sep) should h be changed to nb_h, ie path_res_n_houses = create_dir(path_res + str(nb_h) + '_houses' + os.sep)?

CER_Benchmark.py Line 108 setting path_res

Line 107 using os.getcwd() caused an issue.
FileNotFoundError: [Errno 2] No such file or directory: '/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/data/CER/data/xT_residential_25728.csv'

  • launch_classif is not defined. Should this be launch_sktime_training in each place where it appears?
  • classif_trainer is not defined. Should this be classif_trainer_deep from _utils_.py?

REFIT parameter confusion for BuildSaveNILMDataset()

I receive the following error.

/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/venv/bin/python /Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/REFIT_Benchmark.py KNNeucli 0 
Traceback (most recent call last):
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/REFIT_Benchmark.py", line 222, in <module>
    REFIT_case(str(sys.argv[1]), classifiers, [list_case[int(sys.argv[2])]], list_param, path_res_n_houses, nb_houses_used=nb_h)
  File "/Users/mforshaw/Downloads/ApplianceDetectionBenchmark-main-2/src/REFIT_Benchmark.py", line 110, in REFIT_case
    train, test = databuilder.BuildSaveNILMDataset(perc=perc_data_used)
TypeError: BuildSaveNILMDataset() got an unexpected keyword argument 'perc'

Could you possibly provide an example parameterisation for the REFIT_Benchmark script to make sure I'm using this correctly?

from appliancedetectionbenchmark.

adrienpetralia avatar adrienpetralia commented on September 24, 2024

Hi Matt,

Thank you very much for your feedback. I fixed all the issues you encountered. Let me know if it's working now!

Best,

Adrien

from appliancedetectionbenchmark.

adrienpetralia avatar adrienpetralia commented on September 24, 2024

Hi Matt,

Thank you again for your valuable feedback. We fixed your remarks and we apologize for all these issues.

Let me know if you're able to launch all the experiments now.

Best,
Adrien

from appliancedetectionbenchmark.

boniolp avatar boniolp commented on September 24, 2024

Hi Adrien,

Thanks, the errors are fixed on my side. @MattForshaw, let us know if you have any other errors while running the code. Otherwise, I will close the issue.

Best,
Paul

from appliancedetectionbenchmark.

Related Issues (2)

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.