diff --git a/Dockerfile b/Dockerfile index 5383377..c749e76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,4 +27,4 @@ RUN pip3 install --no-cache-dir \ # Install requirements COPY ./ ./ -RUN pip3 install -e .[tests,docs,examples] +RUN pip3 install --no-cache-dir -e .[tests,docs,examples] diff --git a/README.md b/README.md index 087850d..9e40656 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ https://pytorch-argus.readthedocs.io ## Installation Requirements: -* torch>=1.1.0 +* torch>=2.0.0 From pip: @@ -31,7 +31,7 @@ pip install pytorch-argus From source: ```bash -pip install -U git+https://github.com/lRomul/argus.git +pip install -U git+https://github.com/lRomul/argus.git@dev ``` ## Example diff --git a/argus/model/model.py b/argus/model/model.py index 24590df..4dee520 100644 --- a/argus/model/model.py +++ b/argus/model/model.py @@ -5,13 +5,13 @@ import argus from argus import types -from argus.model.build import BuildModel from argus.engine import Engine, State -from argus.callbacks import Callback, attach_callbacks +from argus.model.build import BuildModel +from argus.utils import deep_to, deep_detach from argus.callbacks.logging import default_logging +from argus.callbacks import Callback, attach_callbacks from argus.metrics.metric import Metric, attach_metrics from argus.metrics.loss import Loss -from argus.utils import deep_to, deep_detach __all__ = ["Model"] @@ -34,6 +34,8 @@ class Model(BuildModel): Args: params (dict): A model parameters. + build_order (Iterable[str]): Order of building model attributes. The default + order is ('nn_module', 'optimizer', 'loss', 'device', 'prediction_transform'). Examples: @@ -83,9 +85,6 @@ class FlexModel(argus.Model): """ - def __init__(self, params: dict): - super().__init__(params) - def train_step(self, batch, state: State) -> dict: """Perform a single train step. diff --git a/docs/source/index.rst b/docs/source/index.rst index b41f509..b5b8c47 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,7 +9,7 @@ Installation Requirements: -* torch>=1.1.0 +* torch>=2.0.0 You can use pip to install Argus: