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
Hi Everyone. I'M Trying To Run A Clearml Server Behind A

Hi everyone. I'm trying to run a ClearML server behind a Cloudflare Zero Trust proxy with a service token for authorization. I can successfully access the server's backend rest API using an HTTP client like HTTPie, but I can't find a way to add the custom headers when using the Python SDK to run tasks. Any suggestions?

  
  
Posted 10 months ago
Votes Newest

Answers 8


The underlying session object used by clearml does not allow providing custom headers at the moment, but it can be added quite easily (see here and here ).
Most calls from within the API can add custom headers, but it would be much easier to inject them at these points than to change the entire code base 🙂

  
  
Posted 10 months ago

This would require a code-change, though (we welcome PRs 🙂 )

  
  
Posted 10 months ago

Hi @<1575656665519230976:profile|SkinnyBat30> , do you mean you need to add custom headers to any call to the API server?

  
  
Posted 10 months ago

I'm looking at from clearml.backend_api.session.client import APIClient rigt now.

  
  
Posted 10 months ago

I'm getting "Object of type "StrictSession" is not callable"

  
  
Posted 10 months ago

OK, thanks. I'll look into it. I might be able to handle the injections via some cloudflare rules.

  
  
Posted 10 months ago

Yes, exactly.

  
  
Posted 10 months ago

The best approach IMO is to provide an option to inject headers using an environment variable, than simply configure it externally

  
  
Posted 10 months ago
524 Views
8 Answers
10 months ago
10 months ago
Tags
Similar posts