Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: pre-commit autoupdate #474

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
# hooks:
# - id: latexindent
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand All @@ -43,7 +43,7 @@ repos:
# # Similar to: https://stackoverflow.com/a/73603491/5755604
# additional_dependencies: ['types-PyYAML']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.4.2
hooks:
- id: ruff
args:
Expand Down
1 change: 0 additions & 1 deletion src/otc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"""Support for custom code."""


__version__ = "0.0.1"
1 change: 1 addition & 0 deletions src/otc/data/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Adapted from here:
https://discuss.pytorch.org/t/dataloader-much-slower-than-manual-batching/27014/6
"""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions src/otc/data/make_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

See `notebooks/` for further details.
"""

import logging
import logging.config
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions src/otc/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

See: https://hagstromer.org/2020/11/23/overestimated-effective-spreads/ for explanation.
"""

from __future__ import annotations

from typing import Literal
Expand Down
1 change: 1 addition & 0 deletions src/otc/models/activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Adapted from:
https://github.com/Yura52/rtdl/blob/main/rtdl/functional.py
"""

import torch
import torch.nn.functional as F # noqa: N812
from torch import nn
Expand Down
1 change: 1 addition & 0 deletions src/otc/models/fttransformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Adapted from:
https://github.com/Yura52/rtdl/
"""

from __future__ import annotations

import enum
Expand Down
1 change: 1 addition & 0 deletions src/otc/models/selftraining.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Based on sklearn implementation.
"""

from __future__ import annotations

import warnings
Expand Down
1 change: 1 addition & 0 deletions src/otc/models/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Currently classical rules and gradient boosted trees are supported.

"""

import logging
import logging.config
import pickle
Expand Down
1 change: 1 addition & 0 deletions src/otc/models/transformer_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Can be used as a consistent interface for evaluation and tuning.
"""

from __future__ import annotations

import gc
Expand Down
1 change: 0 additions & 1 deletion src/otc/optim/early_stopping.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Adapted from here: https://bit.ly/3tTnyLU.
"""


import logging
import logging.config
import math
Expand Down
1 change: 1 addition & 0 deletions src/otc/optim/scheduler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Learnin rate scheduler with linear warmup phase and cosine decay."""

from typing import List

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/otc/utils/check_formalia.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

TODO: add more tests.
"""

import os
import re
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions src/otc/utils/check_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Looks into .bib and .tex files.
"""

import os
import re
from pathlib import Path
Expand Down
1 change: 0 additions & 1 deletion tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
categorical data.
"""


import numpy as np
import pandas as pd
import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_objective.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for Objectives."""

import datetime as dt
from pathlib import Path
from unittest.mock import patch
Expand Down