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
Is There An Larger Example On How To Use Task.Connect Other Than In The Doc String? For Example

Is there an larger example on how to use task.connect other than in the doc string?

For example None says "Once objects are connected to a task, all object elements (e.g. class members, dictionary key-values pairs) are automatically logged by ClearML. Additionally, ClearML tracks these values as they change through your code." - The logging works, but I do not see how I can change such values in such a way that change is logged. I tried TaskParameters and dict for the connect value, but nothing works.

  
  
Posted one year ago
Votes Newest

Answers 4


I expect either 'var1' to be 'b' or - better - there to be log of the change, so that I would be able to see how the value changed over time.

  
  
Posted one year ago

Thank you I found the error.
myPar = task.connect(myPar, name='from TaskParameters')
is required.

  
  
Posted one year ago

Hi @<1523704157695905792:profile|VivaciousBadger56> , you can see an example of usage of Task.connect() here:
None

  
  
Posted one year ago

Here is my code:

from clearml import Task, TaskTypes
from clearml.task_parameters import TaskParameters, param, percent_param

class MyParams(TaskParameters):

    iterations = param(
        type=int,
        desc="Number of iterations to run",
        range=(0, 100000),
    )

    target_accuracy = percent_param(
        desc="The target accuracy of the model",
    )

myPar = MyParams(iterations=1000, target_accuracy=0.95)
parameters_to_track1 = {'var1': 'a', 'hyper_par': 1}
parameters_to_track2 = {'var2': 'c', 'hyper_par2': 4}

task = Task.init(project_name='FirstTrial', task_name='first_trial', task_type=TaskTypes.training)
task.connect(parameters_to_track1, name='from dictionary 1')
task.connect(parameters_to_track2, name='from dictionary 2')
task.connect(myPar, name='from TaskParameters')
dataset_name = "Demodata"
parameters_to_track1['var1'] = 'b'
parameters_to_track1['hyper_par'] = 2

Here is what I see:
image

  
  
Posted one year ago
694 Views
4 Answers
one year ago
one year ago
Tags