Skip to content

Commit

Permalink
added the decorator for patching the environment variable allowing mp…
Browse files Browse the repository at this point in the history
…s to fallback to CPU
  • Loading branch information
fnhirwa committed Sep 4, 2024
1 parent 470c736 commit 3061fe6
Show file tree
Hide file tree
Showing 16 changed files with 140 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/helpers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .envy_patching import monkeypatch_env

__all__ = ["monkeypatch_env"]
46 changes: 46 additions & 0 deletions tests/helpers/envy_patching.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from functools import wraps

import pytest


def monkeypatch_env(key, value):
"""Decorator to monkeypatch environment variables in tests.
Parameters
----------
key : str
The environment variable key.
value : str
The environment variable value.
Returns
-------
decorator
The decorator function that will monkeypatch the environment variable.
Examples
--------
import os
import pytest
from helpers import monkeypatch_env
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_get_lstm_cell():
assert os.getenv("PYTORCH_ENABLE_MPS_FALLBACK") == "1"
"""

def decorator(test_func):
@wraps(test_func)
def wrapper(*args, **kwargs):
@pytest.fixture
def _monkeypatch_env(monkeypatch):
monkeypatch.setenv(key, value)

@pytest.mark.usefixtures("_monkeypatch_env")
def run_test():
return test_func(*args, **kwargs)

return run_test()

return wrapper

return decorator
8 changes: 8 additions & 0 deletions tests/test_data/test_encoders.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from copy import deepcopy
import itertools

from helpers import monkeypatch_env
import numpy as np
import pandas as pd
import pytest
Expand All @@ -26,6 +27,7 @@
[True, False],
),
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_NaNLabelEncoder(data, allow_nan):
fit_data, transform_data = data
encoder = NaNLabelEncoder(warn=False, add_nan=allow_nan)
Expand All @@ -42,6 +44,7 @@ def test_NaNLabelEncoder(data, allow_nan):
assert encoder.transform(fit_data)[0] > 0, "First value should not be 0 if not nan"


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_NaNLabelEncoder_add():
encoder = NaNLabelEncoder(add_nan=False)
encoder.fit(np.array(["a", "b", "c"]))
Expand Down Expand Up @@ -70,6 +73,7 @@ def test_NaNLabelEncoder_add():
dict(max_length=[1, 2]),
],
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_EncoderNormalizer(kwargs):
kwargs.setdefault("method", "standard")
kwargs.setdefault("center", True)
Expand Down Expand Up @@ -105,6 +109,7 @@ def test_EncoderNormalizer(kwargs):
[[], ["a"]],
),
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_GroupNormalizer(kwargs, groups):
data = pd.DataFrame(dict(a=[1, 1, 2, 2, 3], b=[1.1, 1.1, 1.0, 0.0, 1.1]))
defaults = dict(method="standard", transformation=None, center=True, scale_by_group=False)
Expand All @@ -129,12 +134,14 @@ def test_GroupNormalizer(kwargs, groups):
).all(), "Inverse transform should reverse transform"


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_EncoderNormalizer_with_limited_history():
data = torch.rand(100)
normalizer = EncoderNormalizer(max_length=[1, 2]).fit(data)
assert normalizer.center_ == data[-1]


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_MultiNormalizer_fitted():
data = pd.DataFrame(dict(a=[1, 1, 2, 2, 3], b=[1.1, 1.1, 1.0, 5.0, 1.1], c=[1.1, 1.1, 1.0, 5.0, 1.1]))

Expand All @@ -153,6 +160,7 @@ def test_MultiNormalizer_fitted():
pytest.fail(f"{NotFittedError}")


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_TorchNormalizer_dtype_consistency():
"""
- Ensures that even for float64 `target_scale`, the transformation will not change the prediction dtype.
Expand Down
2 changes: 2 additions & 0 deletions tests/test_data/test_samplers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from helpers import monkeypatch_env
import pytest
import torch
from torch.utils.data.sampler import SequentialSampler
Expand All @@ -13,6 +14,7 @@
(True, False, False, 1000),
],
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_TimeSynchronizedBatchSampler(test_dataset, shuffle, drop_last, as_string, batch_size):
if as_string:
dataloader = test_dataset.to_dataloader(
Expand Down
20 changes: 20 additions & 0 deletions tests/test_data/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pickle
from typing import Dict

from helpers import monkeypatch_env
import numpy as np
import pandas as pd
import pytest
Expand All @@ -15,6 +16,7 @@
from pytorch_forecasting.utils import to_list


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_find_end_indices():
diffs = np.array([1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1])
max_lengths = np.array([4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1])
Expand All @@ -26,6 +28,7 @@ def test_find_end_indices():
np.testing.assert_array_equal(missings, missings_test)


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_raise_short_encoder_length(test_data):
with pytest.warns(UserWarning):
test_data = test_data[lambda x: ~((x.agency == "Agency_22") & (x.sku == "SKU_01") & (x.time_idx > 3))]
Expand All @@ -41,6 +44,7 @@ def test_raise_short_encoder_length(test_data):
)


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_categorical_target(test_data):
dataset = TimeSeriesDataSet(
test_data,
Expand All @@ -56,11 +60,13 @@ def test_categorical_target(test_data):
assert y[0].dtype is torch.long, "target must be of type long"


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_pickle(test_dataset):
pickle.dumps(test_dataset)
pickle.dumps(test_dataset.to_dataloader())


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def check_dataloader_output(dataset: TimeSeriesDataSet, out: Dict[str, torch.Tensor]):
x, y = out

Expand Down Expand Up @@ -142,6 +148,7 @@ def check_dataloader_output(dataset: TimeSeriesDataSet, out: Dict[str, torch.Ten
dict(target_normalizer=None),
],
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_TimeSeriesDataSet(test_data, kwargs):
defaults = dict(
time_idx="time_idx",
Expand All @@ -165,11 +172,13 @@ def test_TimeSeriesDataSet(test_data, kwargs):
check_dataloader_output(dataset, next(iter(dataset.to_dataloader(num_workers=0))))


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_from_dataset(test_dataset, test_data):
dataset = TimeSeriesDataSet.from_dataset(test_dataset, test_data)
check_dataloader_output(dataset, next(iter(dataset.to_dataloader(num_workers=0))))


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_from_dataset_equivalence(test_data):
training = TimeSeriesDataSet(
test_data[lambda x: x.time_idx < x.time_idx.max() - 1],
Expand Down Expand Up @@ -205,6 +214,7 @@ def test_from_dataset_equivalence(test_data):
assert torch.isclose(v1[1][0], v2[1][0]).all()


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_dataset_index(test_dataset):
index = []
for x, _ in iter(test_dataset.to_dataloader()):
Expand All @@ -214,6 +224,7 @@ def test_dataset_index(test_dataset):


@pytest.mark.parametrize("min_prediction_idx", [0, 1, 3, 7])
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_min_prediction_idx(test_dataset, test_data, min_prediction_idx):
dataset = TimeSeriesDataSet.from_dataset(
test_dataset, test_data, min_prediction_idx=min_prediction_idx, min_encoder_length=1, max_prediction_length=10
Expand All @@ -233,6 +244,7 @@ def test_min_prediction_idx(test_dataset, test_data, min_prediction_idx):
("Agency_01", "agency", "decoder"),
],
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_overwrite_values(test_dataset, value, variable, target):
dataset = deepcopy(test_dataset)

Expand Down Expand Up @@ -281,6 +293,7 @@ def test_overwrite_values(test_dataset, value, variable, target):
),
],
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_new_group_ids(test_data, kwargs):
"""Test for new group ids in dataset"""
train_agency = test_data["agency"].iloc[0]
Expand Down Expand Up @@ -308,6 +321,7 @@ def test_new_group_ids(test_data, kwargs):
pass


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_timeseries_columns_naming(test_data):
with pytest.raises(ValueError):
TimeSeriesDataSet(
Expand All @@ -322,6 +336,7 @@ def test_timeseries_columns_naming(test_data):
)


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_encoder_normalizer_for_covariates(test_data):
dataset = TimeSeriesDataSet(
test_data,
Expand Down Expand Up @@ -349,6 +364,7 @@ def test_encoder_normalizer_for_covariates(test_data):
dict(weight="volume"),
],
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_multitarget(test_data, kwargs):
dataset = TimeSeriesDataSet(
test_data.assign(volume1=lambda x: x.volume),
Expand All @@ -366,6 +382,7 @@ def test_multitarget(test_data, kwargs):
next(iter(dataset.to_dataloader()))


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_check_nas(test_data):
data = test_data.copy()
data.loc[0, "volume"] = np.nan
Expand All @@ -391,6 +408,7 @@ def test_check_nas(test_data):
dict(target=["volume", "agency"]),
],
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_lagged_variables(test_data, kwargs):
dataset = TimeSeriesDataSet(
test_data.copy(),
Expand Down Expand Up @@ -428,6 +446,7 @@ def test_lagged_variables(test_data, kwargs):
"agency,first_prediction_idx,should_raise",
[("Agency_01", 0, False), ("xxxxx", 0, True), ("Agency_01", 100, True), ("Agency_01", 4, False)],
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_filter_data(test_dataset, agency, first_prediction_idx, should_raise):
func = lambda x: (x.agency == agency) & (x.time_idx_first_prediction >= first_prediction_idx)
if should_raise:
Expand All @@ -444,6 +463,7 @@ def test_filter_data(test_dataset, agency, first_prediction_idx, should_raise):
assert index["time_idx"].min() == first_prediction_idx, "First prediction filter has failed"


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_graph_sampler(test_dataset):
from pytorch_forecasting.data.samplers import TimeSynchronizedBatchSampler

Expand Down
10 changes: 10 additions & 0 deletions tests/test_metrics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import itertools

from helpers import monkeypatch_env
import pytest
import torch
from torch.nn.utils import rnn
Expand All @@ -18,6 +19,7 @@
from pytorch_forecasting.metrics.base_metrics import AggregationMetric, CompositeMetric


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_composite_metric():
metric1 = SMAPE()
metric2 = MAE()
Expand Down Expand Up @@ -50,6 +52,7 @@ def test_composite_metric():
(2 * torch.ones(2, dtype=torch.long), torch.tensor([[[0.0, 1.0], [1.0, 1.0]], [[5.0, 1.0], [1.0, 2.0]]])),
],
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_aggregation_metric(decoder_lengths, y):
y_pred = torch.tensor([[0.0, 2.0], [4.0, 3.0]])
if (decoder_lengths != y_pred.size(-1)).any():
Expand All @@ -65,6 +68,7 @@ def test_aggregation_metric(decoder_lengths, y):


@pytest.mark.xfail(reason="failing, to be fixed, bug #1614")
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_none_reduction():
pred = torch.rand(20, 10)
target = torch.rand(20, 10)
Expand All @@ -77,6 +81,7 @@ def test_none_reduction():
["center", "transformation"],
itertools.product([True, False], ["log", "log1p", "softplus", "relu", "logit", None]),
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_NormalDistributionLoss(center, transformation):
mean = 1.0
std = 0.1
Expand Down Expand Up @@ -106,6 +111,7 @@ def test_NormalDistributionLoss(center, transformation):
["center", "transformation"],
itertools.product([True, False], ["log", "log1p", "softplus", "relu", "logit", None]),
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_LogNormalDistributionLoss(center, transformation):
mean = 2.0
std = 0.2
Expand Down Expand Up @@ -136,6 +142,7 @@ def test_LogNormalDistributionLoss(center, transformation):
["center", "transformation"],
itertools.product([True, False], ["log", "log1p", "softplus", "relu", "logit", None]),
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_NegativeBinomialDistributionLoss(center, transformation):
mean = 100.0
shape = 1.0
Expand All @@ -161,6 +168,7 @@ def test_NegativeBinomialDistributionLoss(center, transformation):
["center", "transformation"],
itertools.product([True, False], ["log", "log1p", "softplus", "relu", "logit", None]),
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_BetaDistributionLoss(center, transformation):
initial_mean = 0.1
initial_shape = 10
Expand All @@ -186,6 +194,7 @@ def test_BetaDistributionLoss(center, transformation):
["center", "transformation"],
itertools.product([True, False], ["log", "log1p", "softplus", "relu", "logit", None]),
)
@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_MultivariateNormalDistributionLoss(center, transformation):
normalizer = TorchNormalizer(center=center, transformation=transformation)

Expand Down Expand Up @@ -213,6 +222,7 @@ def test_MultivariateNormalDistributionLoss(center, transformation):
assert torch.isclose(target.std(), samples.std(), atol=0.1, rtol=0.7)


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_ImplicitQuantileNetworkDistributionLoss():
batch_size = 3
n_timesteps = 2
Expand Down
3 changes: 3 additions & 0 deletions tests/test_models/test_baseline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from helpers import monkeypatch_env

from pytorch_forecasting import Baseline


@monkeypatch_env("PYTORCH_ENABLE_MPS_FALLBACK", "1")
def test_integration(multiple_dataloaders_with_covariates):
dataloader = multiple_dataloaders_with_covariates["val"]
Baseline().predict(dataloader, fast_dev_run=True)

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates0] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates1] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates2] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates3] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates4] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates5] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates6] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates7] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates8] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.11)

test_integration[multiple_dataloaders_with_covariates9] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates0] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates1] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates2] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates3] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates4] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates5] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates6] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates7] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates8] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.10)

test_integration[multiple_dataloaders_with_covariates9] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates0] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates1] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates2] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates3] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates4] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates5] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates6] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates7] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates8] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.9)

test_integration[multiple_dataloaders_with_covariates9] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates0] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates1] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates2] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates3] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates4] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates5] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates6] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates7] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates8] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.8)

test_integration[multiple_dataloaders_with_covariates9] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates0] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates1] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates2] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates3] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates4] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates5] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates6] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates7] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates8] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).

Check failure on line 9 in tests/test_models/test_baseline.py

View workflow job for this annotation

GitHub Actions / Run pytest (macos-latest, 3.12)

test_integration[multiple_dataloaders_with_covariates9] RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).
Expand Down
Loading

0 comments on commit 3061fe6

Please sign in to comment.