Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi All, Is There Any Way To Know The Upload Status Of An Artifact So That Once The Upload Is Completed Another Action Can Be Performed? I Am Using A Temporary File, Since The Upload Process Of An Artifact Is Running In Background, During This Process The

Hi all,
Is there any way to know the upload status of an artifact so that once the upload is completed another action can be performed? I am using a temporary file, since the upload process of an artifact is running in background, during this process the temporary file is removed, so the task does not find the file and it cannot be uploaded as an artifact:
2021-10-19 09:00:00,930 - clearml - WARNING - Skipping upload, could not find object file '/user/myproject/tmpgem_lb2b.pickle'

This is the code I'm using to build the mock example:
` from clearml import Task

def main():
import os
import tempfile

task = Task.init(project_name="Mocks", task_name="uploading_artifact_background")
temp_file = tempfile.NamedTemporaryFile(dir=os.getcwd(), suffix=".pickle")
task.upload_artifact(name="temp_scalers", artifact_object=temp_file.name)
print("Artifact successfully uploaded!")
temp_file.close()
print("Getting scalers local copy... Here it is:")
print(task.artifacts["temp_scalers"].get_local_copy())

if name == "main":
main() `

  
  
Posted 2 years ago
Votes Newest

Answers 2


Hi GiganticTurtle0 ,

Uploading artifact is being done async, maybe this is the issue in your case, you can change it with wait_on_upload=True , can you try it?

  
  
Posted 2 years ago

It worked! Thank you very much

  
  
Posted 2 years ago
604 Views
2 Answers
2 years ago
one year ago
Tags