newron.log_text()
newron.log_text(text: str, artifact_file: str) → None
Used to log text as an artifact
Parameters
- text - String containing text to log
- artifact_file - The run-relative artifact file path in posixpath format to which the text is saved (e.g. “dir/file.txt”)
Example
import newron
with newron.start_run():
# Log text to a file under the run's root artifact directory
newron.log_text("text1", "file1.txt")
# Log text in a subdirectory of the run's root artifact directory
newron.log_text("text2", "dir/file2.txt")
# Log HTML text
newron.log_text("<h1>header</h1>", "index.html")