tests.system.huggingface.example_write

Publish to a temporary private Hub repo and validate XCom, asset, and Hub head.

Attributes

HUB_ORG

SYSTEM_TESTS_ENV_ID

REPO_BASE

REPO_ID

REPO_DURABLE_BASE

REPO_DURABLE_ID

CONN_ID

REVISION

PUBLISHED_ASSET

DURABLE_ASSET

test_run

Classes

FailAfterSuccessfulFirstPushOperator

Raise after the first successful commit; retries must reuse that commit.

Functions

keep_columns(example)

add_row_marker(example)

create_private_repo()

Module Contents

tests.system.huggingface.example_write.HUB_ORG[source]
tests.system.huggingface.example_write.SYSTEM_TESTS_ENV_ID[source]
tests.system.huggingface.example_write.REPO_BASE[source]
tests.system.huggingface.example_write.REPO_ID[source]
tests.system.huggingface.example_write.REPO_DURABLE_BASE[source]
tests.system.huggingface.example_write.REPO_DURABLE_ID[source]
tests.system.huggingface.example_write.CONN_ID[source]
tests.system.huggingface.example_write.REVISION = 'bcdcba79d07bc864c1c254ccfcedcce55bcc9a8c'[source]
tests.system.huggingface.example_write.PUBLISHED_ASSET[source]
tests.system.huggingface.example_write.DURABLE_ASSET[source]
tests.system.huggingface.example_write.keep_columns(example)[source]
tests.system.huggingface.example_write.add_row_marker(example)[source]
class tests.system.huggingface.example_write.FailAfterSuccessfulFirstPushOperator(*, input_uri, repo_id, config=None, private=None, commit_message=None, huggingface_conn_id='huggingface_default', storage_conn_id=None, push_kwargs=None, durable=True, **kwargs)[source]

Bases: airflow.providers.huggingface.operators.datasets.PushToHubOperator

Raise after the first successful commit; retries must reuse that commit.

execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

tests.system.huggingface.example_write.create_private_repo()[source]
tests.system.huggingface.example_write.test_run[source]

Was this entry helpful?