Skip to content

Commit

Permalink
[get_offline_features] Updated to mlrun 1.6.3 (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
yonishelach authored Jun 13, 2024
1 parent 1ca8e5e commit 55a6023
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
18 changes: 9 additions & 9 deletions get_offline_features/function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kind: job
metadata:
name: get-offline-features
tag: ''
hash: 5ac6c4e2b67440b464710c072708a3581125c2f8
hash: 22cc15eacc16e61f2fc1a9579fabde9ef7a2fce2
project: ''
labels:
author: yonish
Expand All @@ -15,10 +15,11 @@ spec:
args: []
image: mlrun/mlrun
build:
functionSourceCode: IyBDb3B5cmlnaHQgMjAxOSBJZ3VhemlvCiMKIyBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsKIyB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuCiMgWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0CiMKIyAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wCiMKIyBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlCiMgZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywKIyBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KIyBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpY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ZpZyBhbmQgaXNpbnN0YW5jZShydW5fY29uZmlnLCBkaWN0KToKICAgICAgICBjb250ZXh0LmxvZ2dlci5pbmZvKCJQcmVwYXJpbmcgcnVuIGNvbmZpZ3VyYXRpb24iKQogICAgICAgIHJ1bl9jb25maWcgPSBmcy5SdW5Db25maWcoKipydW5fY29uZmlnKQoKICAgICMgQ2FsbGluZyBnZXRfb2ZmbGluZV9mZWF0dXJlczoKICAgIGNvbnRleHQubG9nZ2VyLmluZm8oCiAgICAgICAgZiJnZXR0aW5nIG9mZmxpbmUgZmVhdHVyZXMgZnJvbSB0aGUgRmVhdHVyZVZlY3RvciB7ZmVhdHVyZV92ZWN0b3J9IgogICAgKQogICAgZnMuZ2V0X29mZmxpbmVfZmVhdHVyZXMoCiAgICAgICAgZmVhdHVyZV92ZWN0b3I9ZmVhdHVyZV92ZWN0b3JfdXJpLAogICAgICAgIGVudGl0eV9yb3dzPWVudGl0eV9yb3dzLAogICAgICAgIGVudGl0eV90aW1lc3RhbXBfY29sdW1uPWVudGl0eV90aW1lc3RhbXBfY29sdW1uLAogICAgICAgIHRhcmdldD10YXJnZXQsCiAgICAgICAgcnVuX2NvbmZpZz1ydW5fY29uZmlnLAogICAgICAgIGRyb3BfY29sdW1ucz1kcm9wX2NvbHVtbnMsCiAgICAgICAgc3RhcnRfdGltZT1zdGFydF90aW1lLAogICAgICAgIGVuZF90aW1lPWVuZF90aW1lLAogICAgICAgIHdpdGhfaW5kZXhlcz13aXRoX2luZGV4ZXMsCiAgICAgICAgdXBkYXRlX3N0YXRzPXVwZGF0ZV9zdGF0cywKICAgICkKCiAgICBjb250ZXh0LmxvZ19yZXN1bHQoImZlYXR1cmVfdmVjdG9yIiwgZmVhdHVyZV92ZWN0b3IpCiAgICBjb250ZXh0LmxvZ19yZXN1bHQoImZlYXR1cmVfdmVjdG9yX3VyaSIsIGZlYXR1cmVfdmVjdG9yX3VyaSkK
commands: []
code_origin: https://github.com/yonishelach/functions.git#82aab1724569d20c73cca114beb2fac0821d3383:/Users/Yonatan_Shelach/projects/functions/get_offline_features/get_offline_features.py
origin_filename: /Users/Yonatan_Shelach/projects/functions/get_offline_features/get_offline_features.py
code_origin: ''
origin_filename: ''
requirements: []
entry_points:
get_offline_features:
name: get_offline_features
Expand Down Expand Up @@ -54,11 +55,9 @@ spec:
- name: context
type: MLClientCtx
doc: MLRun context
default: ''
- name: feature_vector
type: str
doc: feature vector uri
default: ''
- name: features
type: Union[List[str], ]
doc: Relevant only if feature_vector not exist. list of feature to collect
Expand Down Expand Up @@ -112,9 +111,10 @@ spec:
doc: update features statistics from the requested feature sets on the vector.
Default is False.
default: false
outputs:
- default: ''
lineno: 27
outputs: []
lineno: 28
has_varargs: false
has_kwargs: false
description: retrieve offline feature vector results
default_handler: get_offline_features
disable_auto_mount: false
Expand Down
3 changes: 2 additions & 1 deletion get_offline_features/get_offline_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
from mlrun.datastore.targets import get_target_driver, kind_to_driver
from mlrun.datastore.base import DataItem
from mlrun.execution import MLClientCtx
from mlrun.utils import StorePrefix, parse_versioned_object_uri
from mlrun.utils import StorePrefix
from mlrun.common.helpers import parse_versioned_object_uri
from mlrun.errors import MLRunInvalidArgumentError


Expand Down
4 changes: 2 additions & 2 deletions get_offline_features/item.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ labels:
author: yonish
maintainers: []
marketplaceType: ''
mlrunVersion: 1.1.0
mlrunVersion: 1.6.3
name: get_offline_features
platformVersion: 3.5.0
spec:
Expand All @@ -23,4 +23,4 @@ spec:
kind: job
requirements: []
url: ''
version: 1.2.0
version: 1.3.0

0 comments on commit 55a6023

Please sign in to comment.