deriva-ml 1.12.0__py3-none-any.whl → 1.12.2__py3-none-any.whl
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.
- deriva_ml/deriva_ml_base.py +1 -5
- deriva_ml/execution.py +2 -1
- deriva_ml/upload.py +13 -13
- {deriva_ml-1.12.0.dist-info → deriva_ml-1.12.2.dist-info}/METADATA +1 -1
- {deriva_ml-1.12.0.dist-info → deriva_ml-1.12.2.dist-info}/RECORD +9 -9
- {deriva_ml-1.12.0.dist-info → deriva_ml-1.12.2.dist-info}/WHEEL +0 -0
- {deriva_ml-1.12.0.dist-info → deriva_ml-1.12.2.dist-info}/entry_points.txt +0 -0
- {deriva_ml-1.12.0.dist-info → deriva_ml-1.12.2.dist-info}/licenses/LICENSE +0 -0
- {deriva_ml-1.12.0.dist-info → deriva_ml-1.12.2.dist-info}/top_level.txt +0 -0
deriva_ml/deriva_ml_base.py
CHANGED
|
@@ -193,11 +193,7 @@ class DerivaML(Dataset):
|
|
|
193
193
|
pass
|
|
194
194
|
|
|
195
195
|
def _check_nbstrip_status(self) -> None:
|
|
196
|
-
"""
|
|
197
|
-
|
|
198
|
-
Returns:
|
|
199
|
-
A Path to the notebook file that is currently being executed.
|
|
200
|
-
"""
|
|
196
|
+
"""Check to see if nbstrip is installed"""
|
|
201
197
|
try:
|
|
202
198
|
if subprocess.run(
|
|
203
199
|
["nbstripout", "--is-installed"],
|
deriva_ml/execution.py
CHANGED
|
@@ -651,6 +651,7 @@ class Execution:
|
|
|
651
651
|
] # Peel off the schema from the asset table
|
|
652
652
|
asset_exe = self._model.find_association(asset_table_name, "Execution")
|
|
653
653
|
asset_exe_path = pb.schemas[asset_exe.schema.name].tables[asset_exe.name]
|
|
654
|
+
|
|
654
655
|
asset_exe_path.insert(
|
|
655
656
|
[
|
|
656
657
|
{
|
|
@@ -706,7 +707,7 @@ class Execution:
|
|
|
706
707
|
"""Return a pathlib Path to the directory in which to place files for the specified execution_asset type.
|
|
707
708
|
|
|
708
709
|
Given the name of an asset table, and a file name, register the file for upload, and return a path to that
|
|
709
|
-
file in the upload directory. In addition to the filename,
|
|
710
|
+
file in the upload directory. In addition to the filename, additional asset metadata and file asset types may
|
|
710
711
|
be specified.
|
|
711
712
|
|
|
712
713
|
This routine has three modes, depending on if file_name refers to an existing file. If it doesn't, a path
|
deriva_ml/upload.py
CHANGED
|
@@ -74,17 +74,16 @@ feature_table_dir_regex = (
|
|
|
74
74
|
+ r"/(?P<schema>[-\w]+)/(?P<target_table>[-\w]+)/(?P<feature_name>[-\w]+)"
|
|
75
75
|
)
|
|
76
76
|
feature_value_regex = (
|
|
77
|
-
feature_table_dir_regex + r"/(?P=feature_name)[.](?P<
|
|
77
|
+
feature_table_dir_regex + r"/(?P=feature_name)[.](?P<ext>[(csv|json)]*)$"
|
|
78
78
|
)
|
|
79
79
|
feature_asset_dir_regex = feature_table_dir_regex + r"/asset/(?P<asset_table>[-\w]+)"
|
|
80
80
|
feature_asset_regex = (
|
|
81
|
-
feature_asset_dir_regex
|
|
82
|
-
+ r"/(?P<file_name>[A-Za-z0-9_-]+)[.](?P<file_ext>[a-z0-9]*)$"
|
|
81
|
+
feature_asset_dir_regex + r"/(?P<file>[A-Za-z0-9_-]+)[.](?P<ext>[a-z0-9]*)$"
|
|
83
82
|
)
|
|
84
83
|
|
|
85
84
|
asset_path_regex = exec_dir_regex + r"/asset/(?P<schema>[-\w]+)/(?P<asset_table>[-\w]*)"
|
|
86
85
|
|
|
87
|
-
asset_file_regex = r"(?P<
|
|
86
|
+
asset_file_regex = r"(?P<file>[-\w]+)[.](?P<ext>[a-z0-9]*)$"
|
|
88
87
|
|
|
89
88
|
table_regex = (
|
|
90
89
|
exec_dir_regex
|
|
@@ -211,15 +210,16 @@ def asset_table_upload_spec(model: DerivaModel, asset_table: str | Table):
|
|
|
211
210
|
"Filename": "{file_name}",
|
|
212
211
|
}
|
|
213
212
|
| {c: f"{{{c}}}" for c in metadata_columns},
|
|
214
|
-
"file_pattern": asset_path, # Sets schema, asset_table,
|
|
213
|
+
"file_pattern": asset_path, # Sets schema, asset_table, file
|
|
214
|
+
"asset_type": "file",
|
|
215
215
|
"target_table": [schema, asset_table.name],
|
|
216
216
|
"checksum_types": ["sha256", "md5"],
|
|
217
217
|
"hatrac_options": {"versioned_urls": True},
|
|
218
218
|
"hatrac_templates": {
|
|
219
|
-
"hatrac_uri": f"/hatrac/{asset_table.name}/{{md5}}.{{file_name}}
|
|
220
|
-
"content-disposition": "filename*=UTF-8''{file_name}
|
|
219
|
+
"hatrac_uri": f"/hatrac/{asset_table.name}/{{md5}}.{{file_name}}",
|
|
220
|
+
"content-disposition": "filename*=UTF-8''{file_name}",
|
|
221
221
|
},
|
|
222
|
-
"record_query_template": "/entity/{target_table}/MD5={
|
|
222
|
+
"record_query_template": "/entity/{target_table}/MD5={md5}&Filename={file_name}",
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
|
|
@@ -244,18 +244,18 @@ def bulk_upload_configuration(model: DerivaModel) -> dict[str, Any]:
|
|
|
244
244
|
"Length": "{file_size}",
|
|
245
245
|
"Filename": "{file_name}",
|
|
246
246
|
},
|
|
247
|
-
"asset_type": "
|
|
247
|
+
"asset_type": "file",
|
|
248
248
|
"target_table": ["{schema}", "{asset_table}"],
|
|
249
249
|
"file_pattern": asset_path_regex
|
|
250
250
|
+ "/"
|
|
251
|
-
+ asset_file_regex, # Sets schema, asset_table,
|
|
251
|
+
+ asset_file_regex, # Sets schema, asset_table, name, ext
|
|
252
252
|
"checksum_types": ["sha256", "md5"],
|
|
253
253
|
"hatrac_options": {"versioned_urls": True},
|
|
254
254
|
"hatrac_templates": {
|
|
255
|
-
"hatrac_uri": "/hatrac/{asset_table}/{md5}.{file_name}
|
|
256
|
-
"content-disposition": "filename*=UTF-8''{file_name}
|
|
255
|
+
"hatrac_uri": "/hatrac/{asset_table}/{md5}.{file_name}",
|
|
256
|
+
"content-disposition": "filename*=UTF-8''{file_name}",
|
|
257
257
|
},
|
|
258
|
-
"record_query_template": "/entity/{target_table}/MD5={md5}&Filename={file_name}
|
|
258
|
+
"record_query_template": "/entity/{target_table}/MD5={md5}&Filename={file_name}",
|
|
259
259
|
},
|
|
260
260
|
# {
|
|
261
261
|
# Upload the records into a table
|
|
@@ -5,23 +5,23 @@ deriva_ml/dataset_aux_classes.py,sha256=YxjQnu2kS9kK_f8bGqhmgE6ty9GNeitCxfvReT9v
|
|
|
5
5
|
deriva_ml/dataset_bag.py,sha256=yS8oYVshfFtRDyhGPRqtbvxjyd3ZFF29lrB783OP4vM,11849
|
|
6
6
|
deriva_ml/demo_catalog.py,sha256=9Qo3JD4bUIwnL3ngPctc2QBeWApvMR_5UyaK9ockTrY,11536
|
|
7
7
|
deriva_ml/deriva_definitions.py,sha256=2eSbTFQ-9rpctphN4PLo8WdtkzMfhfZr3vJeywt6xPM,8897
|
|
8
|
-
deriva_ml/deriva_ml_base.py,sha256=
|
|
8
|
+
deriva_ml/deriva_ml_base.py,sha256=rrImShp1RXvMuXVLft5GfTnxf_PfF1LONHgV1Ee_E9I,46517
|
|
9
9
|
deriva_ml/deriva_model.py,sha256=wytGCAHutiUaRfnRKr80Ks_P6ci0_wXRU3vq3lthfYU,13260
|
|
10
|
-
deriva_ml/execution.py,sha256=
|
|
10
|
+
deriva_ml/execution.py,sha256=SggLMAfQevnkGyaixF6dRwn36qHO5s07wkLxQXmNCag,36020
|
|
11
11
|
deriva_ml/execution_configuration.py,sha256=XQeXzPz9Gh_AGa_iYW8zF95niwHed3ojv4gnibB0thA,4082
|
|
12
12
|
deriva_ml/execution_environment.py,sha256=bCRKrCELDbGQDo7_FKfw7e8iMzVjSRZK3baKkqH5-_0,3264
|
|
13
13
|
deriva_ml/feature.py,sha256=07g0uSrhumdopJluWuWSRMrzagaikAOihqB09bzXBP4,5475
|
|
14
14
|
deriva_ml/history.py,sha256=qTDLDs8Ow_6r7mDO0gZm0Fg81SWKOAgtCU5pzZoDRgM,2828
|
|
15
15
|
deriva_ml/test_functions.py,sha256=-eqLHjjCQCLBNAr1ofbZekNiCOfMISSACRxT_YHER8I,4396
|
|
16
|
-
deriva_ml/upload.py,sha256=
|
|
16
|
+
deriva_ml/upload.py,sha256=gHTGXAVlf56EwNzmw5zY0gbBf8h08eU2q2GBbb2FdVc,16087
|
|
17
17
|
deriva_ml/schema_setup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
deriva_ml/schema_setup/annotations.py,sha256=v0gTpmWYxRqsQ-bcnQzsr8WowGv2pi9pZUsO3WWnu1U,9528
|
|
19
19
|
deriva_ml/schema_setup/create_schema.py,sha256=hNMc-v5tferd0UjfdB6nBw7Rc_o-Mg6NkPqQGie9YOw,11700
|
|
20
20
|
deriva_ml/schema_setup/policy.json,sha256=77sf0Imy6CAQV0_VwwbA56_KROJ05WXsvT-Wjtkk538,1633
|
|
21
21
|
deriva_ml/schema_setup/table_comments_utils.py,sha256=-2_ubEpoH7ViLVb-ZfW9wZbQ26DTKNgjkCABMzGu4i4,2140
|
|
22
|
-
deriva_ml-1.12.
|
|
23
|
-
deriva_ml-1.12.
|
|
24
|
-
deriva_ml-1.12.
|
|
25
|
-
deriva_ml-1.12.
|
|
26
|
-
deriva_ml-1.12.
|
|
27
|
-
deriva_ml-1.12.
|
|
22
|
+
deriva_ml-1.12.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
23
|
+
deriva_ml-1.12.2.dist-info/METADATA,sha256=EcMVbM-QX5myyijRGJnUmaQOjOCHhxHf-27T68A8P18,974
|
|
24
|
+
deriva_ml-1.12.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
25
|
+
deriva_ml-1.12.2.dist-info/entry_points.txt,sha256=ZiOvrYj022x544TQwi018ujeHRRDahNmwJnzn5ThacM,242
|
|
26
|
+
deriva_ml-1.12.2.dist-info/top_level.txt,sha256=I1Q1dkH96cRghdsFRVqwpa2M7IqJpR2QPUNNc5-Bnpw,10
|
|
27
|
+
deriva_ml-1.12.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|