cotlab 0.8.2__tar.gz → 0.8.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cotlab-0.8.4/.github/dependabot.yml +7 -0
- cotlab-0.8.4/.github/workflows/container.yml +78 -0
- cotlab-0.8.4/.github/workflows/docs.yml +60 -0
- cotlab-0.8.4/.github/workflows/lint.yml +58 -0
- cotlab-0.8.4/.github/workflows/release.yml +57 -0
- cotlab-0.8.4/.github/workflows/tests.yml +119 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/PKG-INFO +1 -1
- {cotlab-0.8.2 → cotlab-0.8.4}/pyproject.toml +2 -4
- cotlab-0.8.4/src/cotlab/__init__.py +5 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/uv.lock +1622 -2427
- cotlab-0.8.2/.github/dependabot.yml +0 -10
- cotlab-0.8.2/.github/workflows/container.yml +0 -53
- cotlab-0.8.2/.github/workflows/docs.yml +0 -38
- cotlab-0.8.2/.github/workflows/lint.yml +0 -38
- cotlab-0.8.2/.github/workflows/release.yml +0 -34
- cotlab-0.8.2/.github/workflows/tests.yml +0 -375
- cotlab-0.8.2/src/cotlab/__init__.py +0 -3
- {cotlab-0.8.2 → cotlab-0.8.4}/.env.example +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/.gitignore +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/.pre-commit-config.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/Containerfile +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/Dockerfile.rocm +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/LICENSE +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/README.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/backend/transformers.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/backend/vllm.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/config.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/afrimedqa.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/cardiology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/histopathology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/m_arc.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/medbullets.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/medmcqa.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/medqa.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/medxpertqa.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/mmlu_medical.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/movie_ood.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/neurology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/oncology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/patching_pairs.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/pediatrics.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/plab.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/probing_diagnosis.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/pubhealthbench.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/pubmedqa.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/radiology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/synthetic.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/dataset/tcga.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/activation_compare.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/activation_patching.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/attention_analysis.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/classification.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/composite_shift_detector.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/confabulation_analysis.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/cot_ablation.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/cot_faithfulness.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/cot_heads.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/entropy_neuron_overlap.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/full_layer_cot.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/full_layer_patching.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/h_neuron_analysis.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/logit_lens.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/multi_head_cot.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/multi_head_patching.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/probing_classifier.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/residual_norm_ood.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/sae_feature_analysis.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/sae_feature_neuron_overlap.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/steering_vectors.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/sycophancy_heads.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/experiment/token_group_contrast.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/adversarial.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/arrogance.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/cardiology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/chain_of_thought.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/contrarian.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/contrarian_matched.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/cot_matched.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/direct_answer.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/direct_matched.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/expert_persona.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/few_shot.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/histopathology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/mcq.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/neurology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/no_instruction.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/oncology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/plab.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/pubhealthbench.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/pubmedqa.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/radiology.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/simple.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/socratic.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/sycophantic.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/tcga.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/conf/prompt/uncertainty.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/data/datasets.yaml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/data/movie_ood.jsonl +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docker-compose.rocm.yml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/api/core.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/api/experiments.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/api/prompts.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/getting-started/installation.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/getting-started/quickstart.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/guide/configuration.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/guide/experiments.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/guide/models.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/guide/prompts.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/index.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/docs/rocm-setup.md +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/mkdocs.yml +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/notebooks/cotlab_tutorial.ipynb +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/scripts/analyze_json_compliance.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/scripts/build_movie_ood_dataset.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/scripts/compare_json_vs_freetext.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/scripts/cotlab-rocm.sh +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/analyse_experiments.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/analysis/__init__.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/analysis/cot_parser.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/analysis/faithfulness_metrics.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/backends/__init__.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/backends/base.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/backends/transformers_backend.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/backends/vllm_backend.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/cli.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/core/__init__.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/core/base.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/core/config.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/core/registry.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/datasets/__init__.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/datasets/loaders.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiment/__init__.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/__init__.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/activation_compare.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/activation_patching.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/attention_analysis.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/classification.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/composite_shift_detector.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/confabulation_analysis.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/cot_ablation.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/cot_faithfulness.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/cot_heads.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/entropy_neuron_overlap.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/full_layer_cot.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/full_layer_patching.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/h_neuron_analysis.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/logit_lens.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/multi_head_cot.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/multi_head_patching.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/probing_classifier.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/residual_norm_ood.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/sae_feature_analysis.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/sae_feature_neuron_overlap.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/steering_vectors.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/experiments/sycophancy_heads.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/logging/__init__.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/logging/json_logger.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/main.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/patching/__init__.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/patching/cache.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/patching/hooks.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/patching/interventions.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/patching/patcher.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/patching/sae.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/__init__.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/cardiology.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/histopathology.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/length_matched_strategies.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/mcq.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/neurology.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/oncology.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/plab.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/pubhealthbench.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/pubmedqa.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/radiology.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/strategies.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/prompts/tcga.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/src/cotlab/runner.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/tests/conftest.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/tests/test_analysis.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/tests/test_backends.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/tests/test_core.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/tests/test_datasets.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/tests/test_experiment_docs.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/tests/test_experiments.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/tests/test_patching.py +0 -0
- {cotlab-0.8.2 → cotlab-0.8.4}/tests/test_prompts.py +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: Container
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-and-push:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
packages: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
|
17
|
+
|
|
18
|
+
- name: Display system information
|
|
19
|
+
run: |
|
|
20
|
+
echo "OS Information:"
|
|
21
|
+
uname -a
|
|
22
|
+
echo ""
|
|
23
|
+
echo "CPU Information:"
|
|
24
|
+
nproc 2>/dev/null || sysctl -n hw.ncpu
|
|
25
|
+
echo "CPU Details:"
|
|
26
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
27
|
+
sysctl -n machdep.cpu.brand_string 2>/dev/null
|
|
28
|
+
echo "CPU cores: $(sysctl -n hw.ncpu)"
|
|
29
|
+
else
|
|
30
|
+
lscpu | head -10
|
|
31
|
+
fi
|
|
32
|
+
echo ""
|
|
33
|
+
echo "Memory Information:"
|
|
34
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
35
|
+
vm_stat | head -5
|
|
36
|
+
else
|
|
37
|
+
free -h | awk '/^Mem:/{print "Memory: " $2}'
|
|
38
|
+
free -h | awk '/^Swap:/{print "Swap: " $2}'
|
|
39
|
+
fi
|
|
40
|
+
- name: Set up Docker Buildx
|
|
41
|
+
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5
|
|
42
|
+
|
|
43
|
+
- name: Log in to GHCR
|
|
44
|
+
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee
|
|
45
|
+
with:
|
|
46
|
+
registry: ghcr.io
|
|
47
|
+
username: ${{ github.actor }}
|
|
48
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
+
|
|
50
|
+
- name: Log in to Docker Hub
|
|
51
|
+
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee
|
|
52
|
+
with:
|
|
53
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
54
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
55
|
+
continue-on-error: true
|
|
56
|
+
|
|
57
|
+
- name: Lowercase repo for GHCR
|
|
58
|
+
run: echo "REPO_LOWER=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
|
59
|
+
|
|
60
|
+
- name: Build and push to GHCR
|
|
61
|
+
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf
|
|
62
|
+
with:
|
|
63
|
+
context: .
|
|
64
|
+
file: ./Containerfile
|
|
65
|
+
push: true
|
|
66
|
+
tags: ghcr.io/${{ env.REPO_LOWER }}:latest
|
|
67
|
+
cache-from: type=gha
|
|
68
|
+
cache-to: type=gha,mode=max
|
|
69
|
+
|
|
70
|
+
- name: Push to Docker Hub
|
|
71
|
+
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf
|
|
72
|
+
with:
|
|
73
|
+
context: .
|
|
74
|
+
file: ./Containerfile
|
|
75
|
+
push: true
|
|
76
|
+
tags: docker.io/huseyincavus/hprobes:latest
|
|
77
|
+
cache-from: type=gha
|
|
78
|
+
continue-on-error: true
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Deploy Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'docs/**'
|
|
9
|
+
- 'mkdocs.yml'
|
|
10
|
+
- '.github/workflows/docs.yml'
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
deploy:
|
|
17
|
+
runs-on: ubuntu-24.04-arm
|
|
18
|
+
permissions:
|
|
19
|
+
contents: write
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
22
|
+
|
|
23
|
+
- name: Display system information
|
|
24
|
+
run: |
|
|
25
|
+
echo "OS Information:"
|
|
26
|
+
uname -a
|
|
27
|
+
echo ""
|
|
28
|
+
echo "CPU Information:"
|
|
29
|
+
nproc 2>/dev/null || sysctl -n hw.ncpu
|
|
30
|
+
echo "CPU Details:"
|
|
31
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
32
|
+
sysctl -n machdep.cpu.brand_string 2>/dev/null
|
|
33
|
+
echo "CPU cores: $(sysctl -n hw.ncpu)"
|
|
34
|
+
else
|
|
35
|
+
lscpu | head -10
|
|
36
|
+
fi
|
|
37
|
+
echo ""
|
|
38
|
+
echo "Memory Information:"
|
|
39
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
40
|
+
vm_stat | head -5
|
|
41
|
+
else
|
|
42
|
+
free -h | awk '/^Mem:/{print "Memory: " $2}'
|
|
43
|
+
free -h | awk '/^Swap:/{print "Swap: " $2}'
|
|
44
|
+
fi
|
|
45
|
+
- name: Set up Python
|
|
46
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
47
|
+
with:
|
|
48
|
+
python-version: "3.11"
|
|
49
|
+
|
|
50
|
+
- name: Install uv
|
|
51
|
+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
52
|
+
with:
|
|
53
|
+
enable-cache: true
|
|
54
|
+
cache-dependency-glob: "pyproject.toml"
|
|
55
|
+
|
|
56
|
+
- name: Install dependencies
|
|
57
|
+
run: uv sync --frozen --extra docs
|
|
58
|
+
|
|
59
|
+
- name: Deploy to GitHub Pages
|
|
60
|
+
run: uv run mkdocs gh-deploy --force
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
runs-on: ubuntu-24.04-arm
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
17
|
+
|
|
18
|
+
- name: Display system information
|
|
19
|
+
run: |
|
|
20
|
+
echo "OS Information:"
|
|
21
|
+
uname -a
|
|
22
|
+
echo ""
|
|
23
|
+
echo "CPU Information:"
|
|
24
|
+
nproc 2>/dev/null || sysctl -n hw.ncpu
|
|
25
|
+
echo "CPU Details:"
|
|
26
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
27
|
+
sysctl -n machdep.cpu.brand_string 2>/dev/null
|
|
28
|
+
echo "CPU cores: $(sysctl -n hw.ncpu)"
|
|
29
|
+
else
|
|
30
|
+
lscpu | head -10
|
|
31
|
+
fi
|
|
32
|
+
echo ""
|
|
33
|
+
echo "Memory Information:"
|
|
34
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
35
|
+
vm_stat | head -5
|
|
36
|
+
else
|
|
37
|
+
free -h | awk '/^Mem:/{print "Memory: " $2}'
|
|
38
|
+
free -h | awk '/^Swap:/{print "Swap: " $2}'
|
|
39
|
+
fi
|
|
40
|
+
- name: Set up Python
|
|
41
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
|
42
|
+
with:
|
|
43
|
+
python-version: "3.11"
|
|
44
|
+
|
|
45
|
+
- name: Install uv
|
|
46
|
+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
47
|
+
with:
|
|
48
|
+
enable-cache: true
|
|
49
|
+
cache-dependency-glob: "pyproject.toml"
|
|
50
|
+
|
|
51
|
+
- name: Install dependencies
|
|
52
|
+
run: uv sync --frozen --extra dev
|
|
53
|
+
|
|
54
|
+
- name: Check formatting
|
|
55
|
+
run: uv run ruff format --check src/ tests/
|
|
56
|
+
|
|
57
|
+
- name: Lint
|
|
58
|
+
run: uv run ruff check src/ tests/
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
runs-on: ubuntu-24.04-arm
|
|
14
|
+
environment: release
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
21
|
+
|
|
22
|
+
- name: Display system information
|
|
23
|
+
run: |
|
|
24
|
+
echo "OS Information:"
|
|
25
|
+
uname -a
|
|
26
|
+
echo ""
|
|
27
|
+
echo "CPU Information:"
|
|
28
|
+
nproc 2>/dev/null || sysctl -n hw.ncpu
|
|
29
|
+
echo "CPU Details:"
|
|
30
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
31
|
+
sysctl -n machdep.cpu.brand_string 2>/dev/null
|
|
32
|
+
echo "CPU cores: $(sysctl -n hw.ncpu)"
|
|
33
|
+
else
|
|
34
|
+
lscpu | head -10
|
|
35
|
+
fi
|
|
36
|
+
echo ""
|
|
37
|
+
echo "Memory Information:"
|
|
38
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
39
|
+
vm_stat | head -5
|
|
40
|
+
else
|
|
41
|
+
free -h | awk '/^Mem:/{print "Memory: " $2}'
|
|
42
|
+
free -h | awk '/^Swap:/{print "Swap: " $2}'
|
|
43
|
+
fi
|
|
44
|
+
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v5
|
|
45
|
+
|
|
46
|
+
- name: Build
|
|
47
|
+
run: uv build
|
|
48
|
+
|
|
49
|
+
- name: Publish to PyPI
|
|
50
|
+
run: uv publish
|
|
51
|
+
# Uses OIDC trusted publishing — no token needed if configured on PyPI
|
|
52
|
+
|
|
53
|
+
- name: Create GitHub Release
|
|
54
|
+
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v2
|
|
55
|
+
with:
|
|
56
|
+
generate_release_notes: true
|
|
57
|
+
files: dist/*
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
unit-tests:
|
|
14
|
+
runs-on: ${{ matrix.os }}
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
os: [ubuntu-latest, macos-latest]
|
|
18
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
22
|
+
|
|
23
|
+
- name: Display system information
|
|
24
|
+
run: |
|
|
25
|
+
echo "OS Information:"
|
|
26
|
+
uname -a
|
|
27
|
+
echo ""
|
|
28
|
+
echo "CPU Information:"
|
|
29
|
+
nproc 2>/dev/null || sysctl -n hw.ncpu
|
|
30
|
+
echo "CPU Details:"
|
|
31
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
32
|
+
sysctl -n machdep.cpu.brand_string 2>/dev/null
|
|
33
|
+
echo "CPU cores: $(sysctl -n hw.ncpu)"
|
|
34
|
+
else
|
|
35
|
+
lscpu | head -10
|
|
36
|
+
fi
|
|
37
|
+
echo ""
|
|
38
|
+
echo "Memory Information:"
|
|
39
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
40
|
+
vm_stat | head -5
|
|
41
|
+
else
|
|
42
|
+
free -h | awk '/^Mem:/{print "Memory: " $2}'
|
|
43
|
+
free -h | awk '/^Swap:/{print "Swap: " $2}'
|
|
44
|
+
fi
|
|
45
|
+
- name: Free disk space (Linux)
|
|
46
|
+
if: runner.os == 'Linux'
|
|
47
|
+
run: |
|
|
48
|
+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
|
|
49
|
+
|
|
50
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
51
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
|
52
|
+
with:
|
|
53
|
+
python-version: ${{ matrix.python-version }}
|
|
54
|
+
|
|
55
|
+
- name: Install uv
|
|
56
|
+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
57
|
+
with:
|
|
58
|
+
enable-cache: true
|
|
59
|
+
cache-dependency-glob: "pyproject.toml"
|
|
60
|
+
|
|
61
|
+
- name: Install dependencies
|
|
62
|
+
run: uv sync --frozen --extra dev
|
|
63
|
+
|
|
64
|
+
- name: Run unit tests
|
|
65
|
+
run: uv run pytest tests/test_core.py tests/test_backends.py tests/test_datasets.py tests/test_prompts.py tests/test_patching.py tests/test_analysis.py -v --tb=short
|
|
66
|
+
|
|
67
|
+
integration-tests:
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
71
|
+
|
|
72
|
+
- name: Display system information
|
|
73
|
+
run: |
|
|
74
|
+
echo "OS Information:"
|
|
75
|
+
uname -a
|
|
76
|
+
echo ""
|
|
77
|
+
echo "CPU Information:"
|
|
78
|
+
nproc 2>/dev/null || sysctl -n hw.ncpu
|
|
79
|
+
echo "CPU Details:"
|
|
80
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
81
|
+
sysctl -n machdep.cpu.brand_string 2>/dev/null
|
|
82
|
+
echo "CPU cores: $(sysctl -n hw.ncpu)"
|
|
83
|
+
else
|
|
84
|
+
lscpu | head -10
|
|
85
|
+
fi
|
|
86
|
+
echo ""
|
|
87
|
+
echo "Memory Information:"
|
|
88
|
+
if [ "$RUNNER_OS" = "macOS" ]; then
|
|
89
|
+
vm_stat | head -5
|
|
90
|
+
else
|
|
91
|
+
free -h | awk '/^Mem:/{print "Memory: " $2}'
|
|
92
|
+
free -h | awk '/^Swap:/{print "Swap: " $2}'
|
|
93
|
+
fi
|
|
94
|
+
- name: Set up Python 3.11
|
|
95
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
|
96
|
+
with:
|
|
97
|
+
python-version: "3.11"
|
|
98
|
+
|
|
99
|
+
- name: Cache Hugging Face models
|
|
100
|
+
uses: actions/cache@v5
|
|
101
|
+
with:
|
|
102
|
+
path: ~/.cache/huggingface
|
|
103
|
+
key: ${{ runner.os }}-hf-gpt2
|
|
104
|
+
restore-keys: |
|
|
105
|
+
${{ runner.os }}-hf-
|
|
106
|
+
|
|
107
|
+
- name: Install uv
|
|
108
|
+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
109
|
+
with:
|
|
110
|
+
enable-cache: true
|
|
111
|
+
cache-dependency-glob: "pyproject.toml"
|
|
112
|
+
|
|
113
|
+
- name: Install dependencies
|
|
114
|
+
run: |
|
|
115
|
+
uv sync --frozen --extra dev
|
|
116
|
+
uv pip install .
|
|
117
|
+
|
|
118
|
+
- name: Run integration tests
|
|
119
|
+
run: uv run pytest tests/test_experiment_docs.py -v --tb=short
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cotlab
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.4
|
|
4
4
|
Summary: CoTLab - Chain of Thought Research Toolkit for LLMs
|
|
5
5
|
Project-URL: Repository, https://github.com/huseyincavusbi/CoTLab
|
|
6
6
|
Project-URL: Documentation, https://huseyincavusbi.github.io/CoTLab
|
|
@@ -4,7 +4,8 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cotlab"
|
|
7
|
-
|
|
7
|
+
version = "0.8.4"
|
|
8
|
+
dynamic = []
|
|
8
9
|
description = "CoTLab - Chain of Thought Research Toolkit for LLMs"
|
|
9
10
|
readme = "README.md"
|
|
10
11
|
requires-python = ">=3.10"
|
|
@@ -75,9 +76,6 @@ Issues = "https://github.com/huseyincavusbi/CoTLab/issues"
|
|
|
75
76
|
cotlab = "cotlab.main:main"
|
|
76
77
|
cotlab-template = "cotlab.cli:cli"
|
|
77
78
|
|
|
78
|
-
[tool.hatch.version]
|
|
79
|
-
path = "src/cotlab/__init__.py"
|
|
80
|
-
|
|
81
79
|
[tool.hatch.build.targets.wheel]
|
|
82
80
|
packages = ["src/cotlab"]
|
|
83
81
|
|