If your computer is offline, or you do not want a Task's data and logs stored in the ClearML Server, use the Offline Mode option. In this mode, all the data and logs that the Task captures from the code are stored in a local folder, which can be later uploaded to the ClearML Server.
Before initializing a Task, use the Task.set_offline class method and set the
offline_mode argument to
The method returns the Task ID and a path to the session folder:
All the information captured by the Task is saved locally. Once the task script finishes execution, it's zipped. The
session's zip folder's location is
Upload the session's execution data that the Task captured offline to the ClearML Server using one of the following:
clearml-taskCLIclearml-task --import-offline-session "/home/user/.clearml/cache/offline/b786845decb14eecadf2be24affc7418.zip"
Pass the path to the zip folder containing the session with the
Task.import_offline_session method.from clearml import TaskTask.import_offline_session(session_folder_zip="/home/user/.clearml/cache/offline/b786845decb14eecadf2be24affc7418.zip")
session_folder_zipargument, insert the path to the zip folder containing the session.
You can also use the offline task to update the execution of an existing previously executed task by providing the previously executed task’s ID. To avoid overwriting metrics, you can specify the initial iteration offset with
Both options will upload the Task's full execution details and outputs and return a link to the Task's results page on the ClearML Server:
The session details can be viewed in the ClearML WebApp, in the "my_task" experiment of the "examples" project, as specified when initializing the Task.