mirror of
https://github.com/clearml/clearml-docs
synced 2025-02-07 13:21:46 +00:00
Add note about cache (#124)
This commit is contained in:
parent
2d6c75e3aa
commit
8e789f6024
@ -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.
|
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
|
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 task’s
|
with the `examples` project. The first task creates and uploads the artifact, and the second task accesses the first task’s
|
||||||
artifact and utilizes it.
|
artifact and utilizes it.
|
||||||
|
|
||||||
## Task 1: Uploading an Artifact
|
## 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`
|
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.
|
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
|
```python
|
||||||
preprocess_task = Task.get_task(task_name='create artifact', project_name='examples')
|
preprocess_task = Task.get_task(task_name='create artifact', project_name='examples')
|
||||||
local_json = preprocess_task.artifacts['data file'].get_local_copy()
|
local_json = preprocess_task.artifacts['data file'].get_local_copy()
|
||||||
|
Loading…
Reference in New Issue
Block a user