Skip to content

Commit

Permalink
Merge pull request #6 from ins-amu/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Ziaeemehr authored Feb 11, 2025
2 parents a84bf4d + c92faff commit cf33839
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ RUN pip install --no-cache-dir hatchling setuptools wheel && \
ARG GPU_SUPPORT=false
RUN if [ "$GPU_SUPPORT" = "true" ]; then pip install cupy; fi

CMD ["python", "-c", "from vbi.utils import test_imports; test_imports()"]
CMD ["python", "-c", "from vbi.utils import test_imports; test_imports()"]
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ To use the Docker image, you can pull it from the GitHub Container Registry and

```bash
docker run --rm -it ghcr.io/ins-amu/vbi:main python3 -c 'from vbi.utils import test_imports; test_imports()'

# if gpu available:
docker run --rm -it --gpus all -e GPU_SUPPORT=true ghcr.io/ins-amu/vbi:main python3 -c 'from vbi.utils import test_imports; test_imports()'
```


Expand Down
8 changes: 4 additions & 4 deletions vbi/feature_extraction/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,12 +924,12 @@ def fc_stat(
info, ts = prepare_input_ts(ts)
if not info:
if verbose:
print("Error in fc_stat")
return [np.nan], ["fc_stat_0"]
print("Error in fc_")
return [np.nan], ["fc_0"]

nn = ts.shape[0]
if nn < 2:
return [np.nan], ["fc_stat_0"]
return [np.nan], ["fc_0"]

if masks is None:
masks = {"full": np.ones((nn, nn))}
Expand All @@ -953,7 +953,7 @@ def fc_stat(
eigenvalues=eigenvalues,
pca_num_components=pca_num_components,
)
labels = [f"fc_stat_{key}_{label}" for label in labels]
labels = [f"fc_{key}_{label}" for label in labels]
Values.extend(values)
Labels.extend(labels)

Expand Down
2 changes: 1 addition & 1 deletion vbi/feature_extraction/features_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def matrix_stat(
for f in features:
v = eval(f)(np.real(eigen_vals_A[:-1]))
values.append(v)
labels.append(f"full_{f}")
labels.append(f"eig_{f}")

for f in features:
v = eval(f)(A_ut)
Expand Down
4 changes: 2 additions & 2 deletions vbi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,14 @@ def test_imports():
try:
import torch
print(f"torch: {torch.__version__}")
print(f"GPU available: {torch.cuda.is_available()}")
print(f"GPU available: {torch.cuda.is_available()=}")
except ImportError:
print("torch not found")

try:
import cupy
print(f"cupy: {cupy.__version__}")
print(f"GPU available: {cupy.cuda.is_available()}")
print(f"GPU available: {cupy.cuda.is_available()=}")
except ImportError:
print("cupy not found")

Expand Down

0 comments on commit cf33839

Please sign in to comment.