aspect-data 0.0.1__tar.gz → 0.0.2__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.
- {aspect_data-0.0.1 → aspect_data-0.0.2}/PKG-INFO +1 -1
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/cli_module/featurize.py +3 -2
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/data.py +3 -4
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/transform/functions.py +6 -1
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect_data.egg-info/PKG-INFO +1 -1
- {aspect_data-0.0.1 → aspect_data-0.0.2}/pyproject.toml +1 -1
- {aspect_data-0.0.1 → aspect_data-0.0.2}/LICENSE +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/README.md +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/__init__.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/checkpoint_utils.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/cli_module/__init__.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/cli_module/cli.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/cli_module/io.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/io.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/package_data.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/transform/__init__.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/transform/base.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/transform/deep_functions.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/transform/registry.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect/typing.py +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect_data.egg-info/SOURCES.txt +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect_data.egg-info/dependency_links.txt +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect_data.egg-info/entry_points.txt +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect_data.egg-info/requires.txt +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/aspect_data.egg-info/top_level.txt +0 -0
- {aspect_data-0.0.1 → aspect_data-0.0.2}/setup.cfg +0 -0
|
@@ -59,7 +59,8 @@ def _parse_feature_spec(x: str, i: int):
|
|
|
59
59
|
parsed_kwargs[k] = parsed_v
|
|
60
60
|
parsed_transforms.append({
|
|
61
61
|
"name": name,
|
|
62
|
-
|
|
62
|
+
"kwargs": parsed_kwargs
|
|
63
|
+
})
|
|
63
64
|
return extra, {output_col: (input_col, tuple(parsed_transforms))}
|
|
64
65
|
|
|
65
66
|
|
|
@@ -142,7 +143,7 @@ def _featurize(args: Namespace) -> None:
|
|
|
142
143
|
from ..data import DataPipeline
|
|
143
144
|
|
|
144
145
|
if args.features:
|
|
145
|
-
extras, column_transforms = _common_feature_spec_routine(args.features)
|
|
146
|
+
extras, column_transforms = _common_feature_spec_routine(args.features, args.extras)
|
|
146
147
|
pipeline = DataPipeline(
|
|
147
148
|
column_transforms=column_transforms,
|
|
148
149
|
columns_to_keep=extras,
|
|
@@ -212,7 +212,6 @@ class DataPipeline:
|
|
|
212
212
|
self._version = _version
|
|
213
213
|
self._app = _app
|
|
214
214
|
self.column_transforms = self.canonicalize_transforms(self._column_transforms)
|
|
215
|
-
self._column_transforms_serialized = self.serialize_transforms(self.column_transforms)
|
|
216
215
|
self.output_format = output_format
|
|
217
216
|
self.output_format_opts = output_format_opts or {}
|
|
218
217
|
self.data_in = None
|
|
@@ -239,7 +238,7 @@ class DataPipeline:
|
|
|
239
238
|
|
|
240
239
|
@cached_property
|
|
241
240
|
def column_transforms_serialized(self):
|
|
242
|
-
self.serialize_transforms(self.column_transforms)
|
|
241
|
+
return self.serialize_transforms(self.column_transforms)
|
|
243
242
|
|
|
244
243
|
def _canonicalize_transforms(
|
|
245
244
|
self,
|
|
@@ -461,7 +460,7 @@ class DataPipeline:
|
|
|
461
460
|
.map(
|
|
462
461
|
self._featurize,
|
|
463
462
|
fn_kwargs={
|
|
464
|
-
"column_transforms": self.
|
|
463
|
+
"column_transforms": self.column_transforms_serialized,
|
|
465
464
|
},
|
|
466
465
|
batched=True,
|
|
467
466
|
batch_size=batch_size,
|
|
@@ -493,7 +492,7 @@ class DataPipeline:
|
|
|
493
492
|
):
|
|
494
493
|
keys = {
|
|
495
494
|
"kwargs": (
|
|
496
|
-
("
|
|
495
|
+
("column_transforms_serialized", "column_transforms"),
|
|
497
496
|
"columns_to_keep",
|
|
498
497
|
"output_format",
|
|
499
498
|
"output_format_opts",
|
|
@@ -171,7 +171,12 @@ def Hash(
|
|
|
171
171
|
if normalize:
|
|
172
172
|
n = np.linalg.norm(vectors, axis=-1, keepdims=True)
|
|
173
173
|
nz = n > 0
|
|
174
|
-
vectors
|
|
174
|
+
vectors = np.divide(
|
|
175
|
+
vectors,
|
|
176
|
+
n,
|
|
177
|
+
out=np.zeros_like(vectors),
|
|
178
|
+
where=n > 0,
|
|
179
|
+
)
|
|
175
180
|
return vectors
|
|
176
181
|
|
|
177
182
|
return _hash
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|