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
Unanswered
Hey Everyone. Can Someone Help Me Understand How Task


This is the snippet that works for me. Please be aware that I use a custom Task.init call at the start of my script ( repo/main_scripts/train.py ), so if you don't do that you need to set add_task_init_call to True.

try:
        repo = os.popen('git remote -v').read().strip().split('\n')
        if len(repo) > 2:
            raise RuntimeError('More than one git repository found')
        repo = repo[0].split('\t')[-1].split(' ')[0]
        branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
        commit = os.popen('git rev-parse HEAD').read().strip()
    except Exception as e:
        logging.error(f'Error getting git repository: {e}')
        raise RuntimeError('Error getting git repository')

    clearml.Task.force_requirements_env_freeze(True)
    # Create a task in ClearML
    task = clearml.Task.create(
        project_name=parameters['experiment']['project_name'],
        task_name=parameters['experiment']['experiment_name'],
        task_type=task_type,
        repo=repo,
        branch=branch,
        commit=commit,
        packages=True,
        script=script,
        add_task_init_call=False,
    )
    task.set_tags(parameters['experiment']['tags'])
    task.set_script(repository=repo, branch=branch, entry_point=script)
    task.connect_configuration(parameters)
  
  
Posted 3 months ago
71 Views
0 Answers
3 months ago
3 months ago