Documentation
See the API Docs.
Installing
pip install marlinfs
Usage
Login
marlin.login()
Batch Ingestion
transform_client = marlin.transform_client(namespace, name, version, entities)
@transform_client.process_function
def process():
dep1 = transform_client.add_dependency('n1', 't1', 'v1', ['f1', 'f2'])
# Reading by timestamp
ingestion_time_read = dep1.read_by_ingestion_ts(1612140982, 1612150982)
event_time_read = dep1.read_by_event_ts(1612140982, 1612150982)
# Reading by date
ingestion_date_read = dep1.read_by_ingestion_date("2021-01-02-03", "2021-01-02-04")
event_date_read = dep1.read_by_event_date("2021-01-02-03", "2021-01-02-04")
# To commit metadata and store data
transform_client.commit()
# assumption is df contains event_timestamp column in date in this format: 2021-01-02-03.
# To pass different date format change return statement to df, {'date_format': 'str_date', 'str_date_format_type': '<python date format>' e.g. %Y-%m-%d})
# To pass event_timestamp in seconds change return statement to df, {'date_format': 'seconds'}
return df
Batch Serving
batch_serving_client = marlin.batch_training_client(namespace, name, version)
# batch_serving_client = marlin.batch_scoring_client(namespace, name, version)
@batch_serving_client.serving_function
def process():
entity_df = None # Some entity df
dep1 = batch_serving_client.add_dependency('n1', 't1', 'v1', ['f1', 'f2'])
dep2 = batch_serving_client.add_dependency('n2', 't1', 'v1', ['f1', 'f2'])
entity_df = pd.DataFrame([
[1, 1, 1, 1, "2021-01-02-03"],
[1, 1, 1, 1, "2021-01-02-03"]
], columns=['A', 'B', 'C', 'D', 'target_timestamp'])
dep1.point_in_time_join_by_date(entity_df)
dep1.point_in_time_join_across_inputs_by_date(entity_df, [dep2])
entity_df = pd.DataFrame([
[1, 1, 1, 1, 1612140982],
[1, 1, 1, 1, 1612140982]
], columns=['A', 'B', 'C', 'D', 'target_timestamp'])
dep1.point_in_time_join_by_ts(entity_df)
dep1.point_in_time_join_across_inputs_by_ts(entity_df, [dep2])
# To commit metadata
batch_serving_client.commit()
Exploration Client
exploration_client = marlin.exploration_client()
tf1 = exploration_client.get_transform('n1', 't1', 'v1')
tf2 = exploration_client.get_transform('n2', 't2', 'v1')
entity_df = pd.DataFrame([
[1, 1, 1, 1, "2021-01-02-03"],
[1, 1, 1, 1, "2021-01-02-03"]
], columns=['A', 'B', 'C', 'D', 'target_timestamp'])
tf1.point_in_time_join_by_date(entity_df)
tf1.point_in_time_join_across_inputs_by_date(entity_df, [tf2])
entity_df = pd.DataFrame([
[1, 1, 1, 1, 1612140982],
[1, 1, 1, 1, 1612140982]
], columns=['A', 'B', 'C', 'D', 'target_timestamp'])
tf1.point_in_time_join_by_ts(entity_df)
tf1.point_in_time_join_across_inputs_by_ts(entity_df, [tf2])
# Reading by timestamp
ingestion_time_read = tf1.read_by_ingestion_ts(1612140982, 1612150982)
event_time_read = tf1.read_by_event_ts(1612140982, 1612150982)
# Reading by date
ingestion_date_read = tf1.read_by_ingestion_date("2021-01-02-03", "2021-01-02-04")
event_date_read = tf1.read_by_event_date("2021-01-02-03", "2021-01-02-04")
Metadata
Release files for marlinfs 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| marlinfs-0.0.2.tar.gz | 23.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| marlinfs-0.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 51.5 kB
Release files / marlinfs-0.0.2.tar.gz
| Download URL | marlinfs-0.0.2.tar.gz |
|---|---|
| Size | 23.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
862255b379cbe9ca21499316c5fcf35d1a657e166de7bc3eaa8feb51a478c459
|
|
BLAKE2b-256 checksum How to use checksums |
f4832e325580411dc9d2f5166d195b87abb1d54895deb463078f64530b17aa5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.9
|
Release files / marlinfs-0.0.2-py2.py3-none-any.whl
| Download URL | marlinfs-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 27.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1929e1fd28a5287187776862a61ab772ccfb05c7ca88fd62ded356f836d2162d
|
|
BLAKE2b-256 checksum How to use checksums |
a2a1dd85c35b05028a9a54fa8e937b5512847bf9af4500db109ff51094d5d44e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.9
|
Security for marlinfs 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.