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
Hello All! Quick Question, Do Any Of You Know Of A Clean Way To Access The Clearml Logger Inside Of A

Hello all!
Quick question, do any of you know of a clean way to access the ClearML logger inside of a pl.LightningModule or even better to get rid of the TensorBoard logger and just use the ClearML one, still inside a pl.LightningModule ?
Thanks

  
  
Posted 2 years ago
Votes Newest

Answers 7


Have you tried
logger = Logger.current_logger()in your code?
Logger is a singleton so you should get the same object from your previously created task
https://clear.ml/docs/latest/docs/references/sdk/logger/#loggercurrent_logger

  
  
Posted 2 years ago

Great, thank you. I was wondering if it was the recommended way but seems like it is.

  
  
Posted 2 years ago

That being said it returns none for me when I reload a task but it's probably something on my side.

  
  
Posted 2 years ago

I did a simple test outside of the pl.LightningModule and it seems like it's not returning anything even there. I'm probably missing something obvious.

  
  
Posted 2 years ago

I ended up using

task = Task.init(

continue_last_task

=task_id)

to reload a specific task and it seems to work well so far.

Exactly, this will initialize and auto log the current process into existing task (task_id). Without the argument continue_last_task ` it will just create a new Task and auto log everything to it 🙂

  
  
Posted 2 years ago

That being said it returns none for me when I reload a task but it's probably something on my side.

MistakenDragonfly51 just making sure, you did call Task.init, correct ?
What dues
from clearml import Task task = Task.current_task()returns ?

Notice that you need to create the Task before actually calling Logger.current_logger() or Task.current_task()

  
  
Posted 2 years ago

I did not, I assumed that Task.init was mostly to initialize a new task and Task.get_task was to load an existing one but it seems I was wrong.

I ended up using task = Task.init( continue_last_task =task_id) to reload a specific task and it seems to work well so far.

Thanks

  
  
Posted 2 years ago