flyte.report
Directory
Classes
| Class | Description |
|---|---|
Report |
Methods
| Method | Description |
|---|---|
current_report() |
Get the current report. |
flush() |
Flush the report. |
get_tab() |
Get a tab by name. |
log() |
Log content to the main tab. |
replace() |
Get the report. |
Methods
current_report()
def current_report()Get the current report. This is a dummy report if not in a task context.
:return: The current report.
flush()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await flush.aio().
def flush()Flush the report.
get_tab()
def get_tab(
name: str,
create_if_missing: bool,
) -> flyte.report._report.TabGet a tab by name. If the tab does not exist, create it.
| Parameter | Type | Description |
|---|---|---|
name |
str |
The name of the tab. |
create_if_missing |
bool |
Whether to create the tab if it does not exist. :return: The tab. |
log()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await log.aio().
def log(
content: str,
do_flush: bool,
)Log content to the main tab. The content should be a valid HTML string, but not a complete HTML document, as it will be inserted into a div.
| Parameter | Type | Description |
|---|---|---|
content |
str |
The content to log. |
do_flush |
bool |
flush the report after logging. |
replace()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await replace.aio().
def replace(
content: str,
do_flush: bool,
)Get the report. Replaces the content of the main tab.
:return: The report.
| Parameter | Type | Description |
|---|---|---|
content |
str |
|
do_flush |
bool |