bertuner 0.2.0__tar.gz → 0.2.1__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.
- {bertuner-0.2.0 → bertuner-0.2.1}/PKG-INFO +1 -1
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner/BERTuner.py +11 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner/__init__.py +1 -1
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner.egg-info/PKG-INFO +1 -1
- {bertuner-0.2.0 → bertuner-0.2.1}/pyproject.toml +1 -1
- {bertuner-0.2.0 → bertuner-0.2.1}/LICENSE +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/README.md +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner/CustomTrainer.py +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner/Predictor.py +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner/TensorBoardCallback.py +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner/constants.py +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner/exceptions.py +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner/utils.py +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner.egg-info/SOURCES.txt +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner.egg-info/dependency_links.txt +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner.egg-info/requires.txt +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/bertuner.egg-info/top_level.txt +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/setup.cfg +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/tests/test_bertuner.py +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/tests/test_numerical_stability.py +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/tests/test_predictor.py +0 -0
- {bertuner-0.2.0 → bertuner-0.2.1}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bertuner
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Hyperparameter optimization and fine-tuning for BERT-style text classifiers (Optuna + MLflow), with long-context ModernBERT support
|
|
5
5
|
Author-email: elemets <alafunnell@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -112,6 +112,17 @@ class BERTuneClassifier:
|
|
|
112
112
|
self.target_cols = target_cols
|
|
113
113
|
self.seed = seed
|
|
114
114
|
self.df = pd.read_csv(data_path) if data_path is not None else dataframe.copy()
|
|
115
|
+
# Missing/NaN text values are coerced to empty strings so tokenization
|
|
116
|
+
# does not error on non-string inputs. Warn so callers know rows were
|
|
117
|
+
# altered rather than dropped.
|
|
118
|
+
n_missing = int(self.df[text_feature].isna().sum())
|
|
119
|
+
if n_missing:
|
|
120
|
+
warnings.warn(
|
|
121
|
+
f"{n_missing} missing (NaN) value(s) in text column "
|
|
122
|
+
f"'{text_feature}' were replaced with empty strings.",
|
|
123
|
+
stacklevel=2,
|
|
124
|
+
)
|
|
125
|
+
self.df[text_feature] = self.df[text_feature].fillna("").astype(str)
|
|
115
126
|
if num_labels is not None:
|
|
116
127
|
self.num_labels = num_labels
|
|
117
128
|
elif self.is_multilabel:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bertuner
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Hyperparameter optimization and fine-tuning for BERT-style text classifiers (Optuna + MLflow), with long-context ModernBERT support
|
|
5
5
|
Author-email: elemets <alafunnell@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "bertuner"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "Hyperparameter optimization and fine-tuning for BERT-style text classifiers (Optuna + MLflow), with long-context ModernBERT support"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|