Skip to content

Commit

Permalink
Remove numpy version upper bound (#729)
Browse files Browse the repository at this point in the history
* remove numpy pin, update base pytorch container
* update changelog
* Update timeseries_dataset.py to fix depricate numpy behavior

---------

Co-authored-by: Nicholas Geneva <[email protected]>
  • Loading branch information
ktangsali and NickGeneva authored Dec 12, 2024
1 parent f607d8f commit c933538
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Dependencies

- Remove the numpy dependency upper bound.

## [0.9.0] - 2024-12-04

### Added
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG BASE_CONTAINER=nvcr.io/nvidia/pytorch:24.06-py3
ARG BASE_CONTAINER=nvcr.io/nvidia/pytorch:24.11-py3
FROM ${BASE_CONTAINER} as builder

ARG TARGETPLATFORM
Expand Down Expand Up @@ -88,10 +88,10 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] && [ "$DGL_ARM64_WHEEL" != "unknown
pip install --no-cache-dir --no-deps /modulus/deps/${DGL_ARM64_WHEEL}; \
elif [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
echo "Installing DGL for: $TARGETPLATFORM" && \
pip install --no-cache-dir --no-deps dgl==2.0.0 -f https://data.dgl.ai/wheels/cu121/repo.html; \
pip install --no-cache-dir --no-deps dgl -f https://data.dgl.ai/wheels/torch-2.4/cu124/repo.html; \
else \
echo "No custom wheel or wheel on PyPi found. Installing DGL for: $TARGETPLATFORM from source" && \
git clone https://github.com/dmlc/dgl.git && cd dgl/ && git checkout tags/v2.0.0 && git submodule update --init --recursive && \
git clone https://github.com/dmlc/dgl.git && cd dgl/ && git checkout tags/v2.4.0 && git submodule update --init --recursive && \
DGL_HOME="/workspace/dgl" bash script/build_dgl.sh -g && \
cd python && \
python setup.py install && \
Expand Down
2 changes: 1 addition & 1 deletion modulus/datapipes/healpix/timeseries_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def __init__(
)
self._forecast_init_indices = np.array(
[
int(np.where(self.ds["time"] == s)[0])
int(np.where(self.ds["time"] == s)[0][0])
for s in self.forecast_init_times
],
dtype="int",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ requires-python = ">=3.10"
license = {text = "Apache 2.0"}
dependencies = [
"torch>=2.0.0",
"numpy>=1.22.4,<1.25",
"numpy>=1.22.4",
"xarray>=2023.1.0",
"zarr>=2.14.2",
"fsspec>=2023.1.0",
Expand Down

0 comments on commit c933538

Please sign in to comment.