Skip to content

Commit

Permalink
Package versions updated (#38)
Browse files Browse the repository at this point in the history
* np.float replaced to float for new numpy compatibility

* packages increased to recent versions in setup and requirements

* README updated with new instructions for installing LIPS

* setup updated with new python version
  • Loading branch information
Mleyliabadi authored Apr 27, 2024
1 parent e583a01 commit fca900e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 29 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ To be able to run the experiments in this repository, the users should install t
- Python >= 3.6

### Setup a Virtualenv (optional)
#### Create a Conda env (recommended)
```commandline
conda create -n venv_lips python=3.10
conda activate venv_lips
```
#### Create a virtual environment

```commandline
Expand All @@ -144,14 +149,14 @@ source venv_lips/bin/activate

### Install using Python Package Index (PyPI)
```commandline
pip install lips-benchmark
pip install lips-benchmark .[recommended]
```

### Install from source
```commandline
git clone https://github.com/IRT-SystemX/LIPS.git
cd LIPS
pip3 install -U .
pip3 install -U .[recommended]
cd ..
```

Expand Down
8 changes: 4 additions & 4 deletions lips/metrics/power_grid/verify_voltage_equality.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ def verify_voltage_at_bus(predictions: dict,
obs = _get_fake_obs(config)
n_buses = 2 * obs.n_sub

mean_matrix_voltage = np.zeros((n_obs, n_buses), dtype=np.float)
mean_matrix_voltage = np.zeros((n_obs, n_buses), dtype=float)
mean_matrix_voltage[:] = np.NaN
std_matrix_voltage = np.zeros((n_obs, n_buses), dtype=np.float)
std_matrix_voltage = np.zeros((n_obs, n_buses), dtype=float)
std_matrix_voltage[:] = np.NaN
mean_matrix_theta = np.zeros((n_obs, n_buses), dtype=np.float)
mean_matrix_theta = np.zeros((n_obs, n_buses), dtype=float)
mean_matrix_theta[:] = np.NaN
std_matrix_theta = np.zeros((n_obs, n_buses), dtype=np.float)
std_matrix_theta = np.zeros((n_obs, n_buses), dtype=float)
std_matrix_theta[:] = np.NaN


Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ json2table==1.1.5
leap-net==0.0.5
lightsim2grid==0.7.5
loguru==0.6.0
numpy==1.21.5
numba==0.55.1
numpy==1.25.2
numba==0.59.1
pandapower==2.8.0
pandas==1.3.4
pandas==1.5.3
pathlib==1.0.1
protobuf==3.20.1
protobuf==3.20.2
pybind11==2.8.1
pytest==6.2.5
pytest-cov==3.0.0
pytest-html==3.1.1
pytest-metadata==1.11.0
PyYAML==6.0
scikit-learn==1.0.1
scipy==1.4.1
scipy==1.11.4
six==1.16.0
tqdm==4.62.3
tensorflow==2.8.0
tensorflow==2.8.1
torch==2.0.1
imageio==2.34.0
plotly==5.20.0
Expand Down
24 changes: 7 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def get_data_files(directory):

pkgs = {
"required": [
"numpy==1.21.5",
"numpy==1.25.2",
"scikit_learn",
"tqdm",
"matplotlib",
"scipy<=1.6.0",
"scipy==1.11.4",
"six",
"pathlib",
"numba",
Expand All @@ -39,11 +39,11 @@ def get_data_files(directory):
"pybind11==2.8.1",
"lightsim2grid==0.7.5", #>=0.7.0.post1",
"leap-net==0.0.5",
"protobuf==3.20.1",
"protobuf==3.20.2",
"pandapower==2.8.0",
"pandas==1.4.2",
"pandas==1.5.3",
"jupyter",
"tensorflow==2.8.0",
"tensorflow==2.8.1",
"torch==2.0.1",
"imageio==2.34.0",
"plotly==5.20.0"
Expand All @@ -57,22 +57,10 @@ def get_data_files(directory):
"gym>=0.17.2"
],
"codabench": [
"pybind11==2.8.1",
"protobuf==3.20.1",
"pandapower==2.8.0",
"pandas==1.4.2",
"jupyter",
"tensorflow==2.8.0",
"torch==2.0.1",
"filelock==3.7.1",
"json2table==1.1.5",
"loguru==0.6.0",
"PyYAML==6.0",
"Grid2Op==1.9.8",
"lightsim2grid==0.7.5",
"leap-net==0.0.5",
"imageio==2.34.0",
"plotly==5.20.0",
"tqdm==4.62.3"
],
"test": [
Expand All @@ -88,6 +76,7 @@ def get_data_files(directory):
}
}

pkgs["extras"]["codabench"] += pkgs["extras"]["recommended"]
pkgs["extras"]["test"] += pkgs["extras"]["recommended"]
pkgs["extras"]["test"] += pkgs["extras"]["docs"]
pkgs["extras"]["test"] += pkgs["extras"]["codabench"]
Expand All @@ -106,6 +95,7 @@ def get_data_files(directory):
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Intended Audience :: Developers",
"Intended Audience :: Education",
Expand Down

0 comments on commit fca900e

Please sign in to comment.