Skip to content

Commit

Permalink
Merge pull request #7 from dobraczka/dev
Browse files Browse the repository at this point in the history
Big bad merge with later cleanup
  • Loading branch information
dobraczka authored Jul 9, 2024
2 parents 43ca009 + a33e2fe commit ea3c0bf
Show file tree
Hide file tree
Showing 54 changed files with 8,677 additions and 3,769 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ jobs:
python -m nltk.downloader punkt
- name: Test with nox
run: nox -s tests

8 changes: 5 additions & 3 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ jobs:
cache: 'poetry'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m pip install nox_poetry
- name: Assess code quality
- name: Lint
run: nox -s style_checking
- name: Assess package quality
run: nox -s pyroma
- name: Type checking
run: nox -s type_checking
- name: Build docs
run: nox -s build_docs

doc_quality:
runs-on: ubuntu-latest
Expand Down
29 changes: 22 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
repos:
- repo: local
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: nox
name: Nox
entry: nox -rs lint --
language: system
types: [python]
require_serial: true
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.3.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format
2 changes: 1 addition & 1 deletion docs/css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
[data-md-color-scheme="slate"] {
--md-primary-fg-color: #7c8e9d;
/* --md-primary-bg-color: #232628; */
--md-hue: 198;
--md-hue: 198;
--md-code-sat: 45%;
--md-code-light: 70%;
--md-code-fg-color: #f5f5f5;
Expand Down
14 changes: 8 additions & 6 deletions encoder_experiment.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import os
from klinker.blockers.base import postprocess
import time
from typing import Any, Dict, Tuple, Type, Union

import click
import numpy as np
from klinker.trackers import WANDBResultTracker
from sylloge import OpenEA

from klinker.blockers.base import postprocess
from klinker.blockers.embedding import KiezEmbeddingBlockBuilder
from klinker.data import KlinkerDataset, NamedVector
from klinker.encoders import (
Expand All @@ -18,6 +14,8 @@
)
from klinker.encoders.deepblocker import DeepBlockerFrameEncoder
from klinker.eval import Evaluation
from klinker.trackers import WANDBResultTracker
from sylloge import OpenEA


def _load_or_create_path(
Expand Down Expand Up @@ -46,7 +44,11 @@ def run_experiment(
n_neighbors: int,
base_dir: str,
):
tracker = WANDBResultTracker(project="klinker", entity="dobraczka", config={**click.get_current_context().params, "encoder_experiment": True})
tracker = WANDBResultTracker(
project="klinker",
entity="dobraczka",
config={**click.get_current_context().params, "encoder_experiment": True},
)
tracker.start_run()
path_or_encoded = _load_or_create_path(base_dir, encoder)
ds = KlinkerDataset.from_sylloge(
Expand Down
Loading

0 comments on commit ea3c0bf

Please sign in to comment.