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
How Can I Test Scripts That Use Clearml In A Ci Environment? The Integration Tests Run In A Docker Container Without Access To A Clearml Server, So I Get The Following Error:

How can I test scripts that use clearml in a CI environment? The integration tests run in a docker container without access to a clearml server, so I get the following error:

if ENV_CLEARML_NO_DEFAULT_SERVER.get() and host == self.default_demo_host:

        raise ValueError(
          "ClearML configuration could not be found (missing `~/clearml.conf` or Environment CLEARML_API_HOST)\n"
            "To get started with ClearML: setup your own `clearml-server`, "
            "or create a free account at  

"

        )

E ValueError: ClearML configuration could not be found (missing ~/clearml.conf or Environment CLEARML_API_HOST)

E To get started with ClearML: setup your own clearml-server, or create a free account at

I have set
Task.set_offline()Is it intended behaviour that clearml then still is looking for a server?

  
  
Posted 2 years ago
Votes Newest

Answers 9


# Never save to clearml demo server Task.set_offline(parameters['experiment'].get('offline', False)) if not Task.is_offline(): os.environ['CLEARML_NO_DEFAULT_SERVER'] = '1' task = Task.init( project_name=parameters['experiment']['project_name'], task_name=parameters['experiment']['experiment_name'], task_type=task_type, tags=parameters['experiment']['tags'], auto_connect_arg_parser=True, auto_connect_streams=True, auto_connect_frameworks=True, auto_resource_monitoring=True, ) task.connect_configuration(parameters)So Task.set_offline is called before the initialization of the task

  
  
Posted 2 years ago

This code snippet does reproduce:
` import os
from clearml import Task

parameters = {
'experiment': {
'project_name': 'test',
'experiment_name': 'test_exp',
'tags': []
}
}

Task.set_offline(True)
if not Task.is_offline():
os.environ['CLEARML_NO_DEFAULT_SERVER'] = '1'
task = Task.init(
project_name=parameters['experiment']['project_name'],
task_name=parameters['experiment']['experiment_name'],
task_type='testing',
tags=parameters['experiment']['tags'],
auto_connect_arg_parser=True,
auto_connect_streams=True,
auto_connect_frameworks=True,
auto_resource_monitoring=True,
)
task.connect_configuration(parameters) `

  
  
Posted 2 years ago

Thank you GreasyPenguin14 , I think you are correct, in offline mode it should not check the "demo server" configuration (as it will not try to connect to a server anyhow).
Could you open a github issue? so this issue is addressed quickly

  
  
Posted 2 years ago

GreasyPenguin14 , Hi 🙂

I'm guessing that it tries to communicate during task.init()
Try running the function when you initialize the Task object

  
  
Posted 2 years ago

In the last versions CLEARML_NO_DEFAULT_SERVER is always true - you don't need to set it

  
  
Posted 2 years ago

Is that the entire code? where are the imports etc?

  
  
Posted 2 years ago

GreasyPenguin14 did you use Task.set_offline() before calling anything else?

  
  
Posted 2 years ago

Thanks GreasyPenguin14 !

  
  
Posted 2 years ago
611 Views
9 Answers
2 years ago
one year ago
Tags
Similar posts