Add note about cache (#124)

This commit is contained in:
pollfly 2021-11-30 12:12:53 +02:00 committed by GitHub
parent 2d6c75e3aa
commit 8e789f6024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ The [using_artifacts_example](https://github.com/allegroai/clearml/blob/master/e
script demonstrates uploading a data file to a task as an artifact and then accessing and utilizing the artifact in a different task.
When the script runs it creates two tasks, `create artifact` and `use artifact from other task`, both of which are associated
with the `examples` project. The first task creates and uploads the artifact and the second task accesses the first tasks
with the `examples` project. The first task creates and uploads the artifact, and the second task accesses the first tasks
artifact and utilizes it.
## Task 1: Uploading an Artifact
@ -31,6 +31,11 @@ After the second task is initialized, the script uses the [`Task.get_task`](../.
class method to get the first task and access its artifacts, specifically the `data file` artifact. The `get_local_copy`
method downloads the files and returns a path.
:::info Cache
ClearML manages a cache of all downloaded content, so the code won't download the
same data multiple times. See [Caching](../../integrations/storage.md#caching) for configuration options.
:::
```python
preprocess_task = Task.get_task(task_name='create artifact', project_name='examples')
local_json = preprocess_task.artifacts['data file'].get_local_copy()