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 one year ago
Votes Newest

Answers 8


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

  
  
Posted one year ago

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 one year ago

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

  
  
Posted one year ago

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

  
  
Posted one year ago

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

  
  
Posted one year ago

Yes, exactly.

  
  
Posted one year ago

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

  
  
Posted one year ago

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

  
  
Posted one year ago
927 Views
8 Answers
one year ago
one year ago
Tags
Similar posts