Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run nilmtk in the cloud? #964

Open
crn565 opened this issue Mar 17, 2023 · 4 comments
Open

How to run nilmtk in the cloud? #964

crn565 opened this issue Mar 17, 2023 · 4 comments

Comments

@crn565
Copy link

crn565 commented Mar 17, 2023

I have had memory problems running NILMTK with the FHMM algorithm with 10 applications. You would certainly think that the lack of physical memory could be made up for by swapping memory, but I'm afraid that doesn't make any headway.
Now my idea is to try to run NILMK on some public infrastructure so I think Google Collab could be an option, but the problem is that there is no direct coverage between the conda and python version of google Cloud and the Nilmtk installation.

@crn565
Copy link
Author

crn565 commented Mar 17, 2023

This my code in Google Collab for the moment:

!pip install -q condacolab

import condacolab

condacolab.install()

!conda update -n base -c conda-forge conda

!conda create --name nilmtk-env

!conda config --add channels conda-forge

$ conda activate nilmtk-env
---->>>> Not works

pip install git+https://github.com/nilmtk/nilmtk

pip install git+https://github.com/nilmtk/nilm_metadata

@crn565
Copy link
Author

crn565 commented Mar 18, 2023

Other option to run nilmtk in the cloud is bender. For now it's posible to activate nilmtk-env but unfortunatelly falls instalalling nilmtk . This is the result of the runing installig commands in the console:

(base) jovyan@jupyter-crn565-2dozm10-5fappliances-2d85v923dl:~$ sudo apt-get update
bash: sudo: command not found
(base) jovyan@jupyter-crn565-2dozm10-5fappliances-2d85v923dl:~$ conda create --name nilmtk-env 
WARNING: A conda environment already exists at '/srv/conda/envs/nilmtk-env'
Remove existing environment (y/[n])? y

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /srv/conda/envs/nilmtk-env



Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate nilmtk-env
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base) jovyan@jupyter-crn565-2dozm10-5fappliances-2d85v923dl:~$ conda config --add channels conda-forge
Warning: 'conda-forge' already in 'channels' list, moving to the top
(base) jovyan@jupyter-crn565-2dozm10-5fappliances-2d85v923dl:~$ conda activate nilmtk-env
(nilmtk-env) jovyan@jupyter-crn565-2dozm10-5fappliances-2d85v923dl:~$ conda install -c nilmtk nilmtk=0.4.3
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): Killed
(nilmtk-env) jovyan@jupyter-crn565-2dozm10-5fappliances-2d85v923dl:~$ 

@crn565 crn565 changed the title How to run nilmtk in Google Collab How to run nilmtk in the cloud? Mar 18, 2023
@annis-souames
Copy link

annis-souames commented Mar 21, 2023

One way to do it without Anaconda\conda, is to clone the project on Colab, and then run setup.py install, this way :

  • Clone the project from Github on colab using this command :
    !git clone https://github.com/nilmtk/nilmtk.git
  • Run the setup.py file : python nilmtk/setup.py install

Note that the free offer in Colab only gives you 16 gb of RAM which usually small for NILM datasets and training deep learning models, but it's worth a try.

@crn565
Copy link
Author

crn565 commented Mar 24, 2023

Thanks for the help. Unfornnatelly the code throw an error:

[1]
7 s
1
!git clone https://github.com/nilmtk/nilmtk.git
Cloning into 'nilmtk'...
remote: Enumerating objects: 12355, done.
remote: Counting objects: 100% (145/145), done.
remote: Compressing objects: 100% (70/70), done.
remote: Total 12355 (delta 79), reused 124 (delta 74), pack-reused 12210
Receiving objects: 100% (12355/12355), 51.88 MiB | 14.74 MiB/s, done.
Resolving deltas: 100% (8785/8785), done.
[6]
0 s
1
!python nilmtk/setup.py install
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "/content/nilmtk/setup.py", line 115, in
long_description=open("README.md", encoding="utf-8").read(),
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants