2020-12-22 21:25:37 +00:00
|
|
|
# ClearML - Example reporting video or audio links/file
|
2020-06-09 20:20:38 +00:00
|
|
|
#
|
|
|
|
import os
|
2020-12-22 21:25:37 +00:00
|
|
|
from clearml import Task, Logger
|
2020-06-09 20:20:38 +00:00
|
|
|
|
|
|
|
|
2020-12-23 22:30:32 +00:00
|
|
|
# Connecting ClearML with the current process,
|
|
|
|
# from here on everything is logged automatically
|
2022-02-14 08:18:41 +00:00
|
|
|
task = Task.init(project_name="examples", task_name="Audio and video reporting")
|
2020-06-09 20:20:38 +00:00
|
|
|
|
2020-06-15 19:48:51 +00:00
|
|
|
print('reporting audio and video samples to the debug samples section')
|
|
|
|
|
|
|
|
# report video, an already uploaded video media (url)
|
2020-06-09 20:20:38 +00:00
|
|
|
Logger.current_logger().report_media(
|
|
|
|
'video', 'big bunny', iteration=1,
|
|
|
|
url='https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_1MB.mp4')
|
|
|
|
|
2020-06-15 19:48:51 +00:00
|
|
|
# report audio, report an already uploaded audio media (url)
|
2020-06-09 20:20:38 +00:00
|
|
|
Logger.current_logger().report_media(
|
|
|
|
'audio', 'pink panther', iteration=1,
|
|
|
|
url='https://www2.cs.uic.edu/~i101/SoundFiles/PinkPanther30.wav')
|
|
|
|
|
2020-06-15 19:48:51 +00:00
|
|
|
# report audio, report local media audio file
|
2020-06-09 20:20:38 +00:00
|
|
|
Logger.current_logger().report_media(
|
|
|
|
'audio', 'tada', iteration=1,
|
2020-06-15 19:48:51 +00:00
|
|
|
local_path=os.path.join('data_samples', 'sample.mp3'))
|