Skip to content

Commit

Permalink
Address Security Issues with Dependencies (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
wistuba authored Jul 2, 2024
1 parent 65b51a9 commit 6e59d3c
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10"]

steps:
- name: Checkout
Expand Down
10 changes: 5 additions & 5 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
docutils==0.20.1
Sphinx==7.2.6
docutils==0.21.2
Sphinx==7.3.7
sphinx-copybutton==0.5.2
sphinx-hoverxref==1.3.0
sphinx-hoverxref==1.4.0
sphinxext-opengraph==0.9.1
pydata-sphinx-theme==0.14.4
sphinx-autodoc-typehints==1.25.2
pydata-sphinx-theme==0.15.4
sphinx-autodoc-typehints==2.2.2
sphinx-paramlinks==0.6.0

# Temporarily added
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ benchmark = [
"wild-time-data==0.1.1",
]
dev = [
"black==23.12.0",
"black==24.4.2",
"avalanche_lib==0.3.1",
"wild-time-data==0.1.1",
"torch>=1.10.0, <1.12.2",
# PyTest Dependencies
"pytest==7.4.3",
"pytest-cov==4.1.0",
"pytest==8.2.2",
"pytest-cov==5.0.0",
"pytest-helpers-namespace==2021.12.29",
]

Expand Down
26 changes: 13 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
numpy>=1.17.2, <1.26.3
numpy>=1.17.2, <2.0.1
torch>=1.10.0, <1.13.2
pandas>=1.4.0, <2.1.5
boto3>=1.26.0, <1.34.3
requests>=2.31.0, <2.31.1
sagemaker>=2.112.0, <2.200.2
syne-tune[aws,gpsearchers]>=0.6.0, <0.10.1
pytorch-lightning>=1.8.0, <1.9.5
Pillow>=10.2, <10.2.1
pandas>=1.4.0, <2.2.3
boto3>=1.26.0, <1.34.138
requests>=2.32.0, <2.32.4
sagemaker>=2.218.0, <2.224.3
syne-tune[aws,gpsearchers]>=0.6.0, <0.13.1
pytorch-lightning>=1.8.0, <1.9.6
Pillow>=10.3.0, <10.4.1
tabulate>=0.9.0, <0.9.1
tensorboardX>=2.5.0, <2.6.3
torchmetrics>=0.11.0, <0.11.5
torchvision>=0.13.0, <0.16.3
deepspeed>=0.9.0, <0.12.6
datasets>=2.9.0, <2.15.1
transformers>=4.36.0, <4.36.3
scipy>=1.10.0, <1.12.1
torchvision>=0.13.0, <0.18.2
deepspeed>=0.9.0, <0.14.5
datasets>=2.9.0, <2.20.1
transformers>=4.38.0, <4.42.4
scipy>=1.10.0, <1.14.1
2 changes: 1 addition & 1 deletion src/renate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
_renate_logger.addHandler(_handler)
_renate_logger.propagate = False

__version__ = "0.5.1"
__version__ = "0.5.2"
8 changes: 5 additions & 3 deletions src/renate/updaters/avalanche/model_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ def _load_learner(
optimizer, scheduler_config = optimizer[0], scheduler_config[0]
lr_scheduler_plugin = LRSchedulerPlugin(
scheduler=scheduler_config["scheduler"],
step_granularity="iteration"
if scheduler_config["interval"] == "step"
else scheduler_config["interval"],
step_granularity=(
"iteration"
if scheduler_config["interval"] == "step"
else scheduler_config["interval"]
),
)
plugins.append(lr_scheduler_plugin)
else:
Expand Down
6 changes: 3 additions & 3 deletions src/renate/updaters/experimental/er.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def _update_memory_buffer(self, step_output: STEP_OUTPUT) -> None:
outputs = step_output["outputs"]
metadata = {"outputs": outputs.detach().cpu()}
for i, intermediate_representation in enumerate(step_output["intermediate_representation"]):
metadata[
f"intermediate_representation_{i}"
] = intermediate_representation.detach().cpu()
metadata[f"intermediate_representation_{i}"] = (
intermediate_representation.detach().cpu()
)
# Some datasets have problems using tensors as subset indices, convert to list of ints.
train_data_idx = [int(idx) for idx in step_output["train_data_idx"]]
dataset = Subset(self._train_dataset, train_data_idx)
Expand Down
6 changes: 3 additions & 3 deletions src/renate/updaters/model_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ def __init__(
self._learner_kwargs["mask_unused_classes"] = mask_unused_classes
if learning_rate_scheduler is not None:
self._learner_kwargs["learning_rate_scheduler"] = learning_rate_scheduler
self._learner_kwargs[
"learning_rate_scheduler_interval"
] = learning_rate_scheduler_interval
self._learner_kwargs["learning_rate_scheduler_interval"] = (
learning_rate_scheduler_interval
)
self._model = model
self._learner_state_file: Optional[str] = None
if input_state_folder is not None:
Expand Down
6 changes: 3 additions & 3 deletions test/renate/benchmark/test_experimentation_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def test_model_fn(model_name, expected_model_class):
num_outputs=2,
num_hidden_layers=1 if model_name == "MultiLayerPerceptron" else None,
hidden_size=1 if model_name == "MultiLayerPerceptron" else None,
pretrained_model_name_or_path="distilbert-base-uncased"
if model_name == "HuggingFaceTransformer"
else None,
pretrained_model_name_or_path=(
"distilbert-base-uncased" if model_name == "HuggingFaceTransformer" else None
),
)
assert isinstance(model, expected_model_class)

Expand Down

0 comments on commit 6e59d3c

Please sign in to comment.