Capitalized examples task name, updated example requirements (#573)

This commit is contained in:
Rizwan Hasan
2022-02-14 14:18:41 +06:00
committed by GitHub
parent ba2e349d0c
commit b494232134
50 changed files with 59 additions and 57 deletions

View File

@@ -6,16 +6,16 @@ from clearml import Task
from time import sleep
task1 = Task.init(project_name='examples', task_name='create artifact')
task1 = Task.init(project_name='examples', task_name='Create artifact')
# upload data file to the initialized task, inputting a name and file location
task1.upload_artifact(name='data file', artifact_object='data_samples/sample.json')
# close the task, to be able to initialize a new task
task1.close()
# initialize another task to use some other task's artifacts
task2 = Task.init(project_name='examples', task_name='use artifact from other task')
task2 = Task.init(project_name='examples', task_name='Use artifact from other task')
# get instance of Task that created artifact (task1), using Task's project and name. You could also use its ID number.
preprocess_task = Task.get_task(project_name='examples', task_name='create artifact')
preprocess_task = Task.get_task(project_name='examples', task_name='Create artifact')
# access artifact from task1, using the artifact's name
# get_local_copy() caches the files for later use and returns a path to the cached file
local_json = preprocess_task.artifacts['data file'].get_local_copy()