clearml icon indicating copy to clipboard operation
clearml copied to clipboard

Offline mode checks server configuration

Open dmus opened this issue 4 years ago • 4 comments
trafficstars

To 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)

This gives:

ValueError: ClearML configuration could not be found (missing ~/clearml.conf or Environment CLEARML_API_HOST) To get started with ClearML: setup your own clearml-server, or create a free account at https://app.community.clear.ml

I would expect that offline mode is not checking for a server

dmus avatar Nov 05 '21 08:11 dmus

@dmus a fix was pushed to the main branch, we'll update when a version that includes it is released 🙂

jkhenning avatar Nov 06 '21 12:11 jkhenning

Hi , I also encountered same issue and used update version of ClearML .

My Error Log :

Traceback (most recent call last): File "C:\Users\30863\Project\dataset\yolov5\train.py", line 630, in main(opt) File "C:\Users\30863\Project\dataset\yolov5\train.py", line 526, in main train(opt.hyp, opt, device, callbacks) File "C:\Users\30863\Project\dataset\yolov5\train.py", line 93, in train loggers = Loggers(save_dir, weights, opt, hyp, LOGGER) # loggers instance File "C:\Users\30863\Project\dataset\yolov5\utils\loggers_init_.py", line 106, in init self.clearml = ClearmlLogger(self.opt, self.hyp) File "C:\Users\30863\Project\dataset\yolov5\utils\loggers\clearml\clearml_utils.py", line 86, in init self.task = Task.init( File "C:\Users\30863\Anaconda3\lib\site-packages\clearml\task.py", line 583, in init task = cls._create_dev_task( File "C:\Users\30863\Anaconda3\lib\site-packages\clearml\task.py", line 3035, in _create_dev_task task = cls( File "C:\Users\30863\Anaconda3\lib\site-packages\clearml\task.py", line 183, in init super(Task, self).init(**kwargs) File "C:\Users\30863\Anaconda3\lib\site-packages\clearml\backend_interface\task\task.py", line 155, in init super(Task, self).init(id=task_id, session=session, log=log) File "C:\Users\30863\Anaconda3\lib\site-packages\clearml\backend_interface\base.py", line 145, in init super(IdObjectBase, self).init(session, log, **kwargs) File "C:\Users\30863\Anaconda3\lib\site-packages\clearml\backend_interface\base.py", line 39, in init self._session = session or self._get_default_session() File "C:\Users\30863\Anaconda3\lib\site-packages\clearml\backend_interface\base.py", line 115, in _get_default_session InterfaceBase._default_session = Session( File "C:\Users\30863\Anaconda3\lib\site-packages\clearml\backend_api\session\session.py", line 178, in init raise ValueError( ValueError: ClearML configuration could not be found (missing ~/clearml.conf or Environment CLEARML_API_HOST) To get started with ClearML: setup your own clearml-server, or create a free account at https://app.clear.ml/

My Snippet Code :

if not self._offline_mode and 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 https://app.clear.ml" )

aravinthk00 avatar Sep 01 '22 11:09 aravinthk00

Hi @aravinthk00, did you set the offline mode? You can do that by setting CLEARML_OFFLINE_MODE=1

jkhenning avatar Sep 01 '22 14:09 jkhenning

After do offline i got upload zip file. I don't understand where to upload can you please explain? Thanks!

KumarS8494 avatar Sep 16 '22 12:09 KumarS8494

Hi @kumartankhush786,

Sorry for the slow answer, were you able to get what you wanted to work? If not, please elaborate on what the need is and I'll try to help!

erezalg avatar Dec 04 '22 14:12 erezalg

Closing this issue due to inactivity. Please reopen if required.

jkhenning avatar Mar 15 '23 13:03 jkhenning