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 There, I Have A Problem With Pyjwt: I Am Using

Hi there, I have a problem with PyJWT: I am using trains==0.16.4 and trains-agent==0.16.3 in my agents. I installed PyJWT==1.7.1 in the agent (through extra_vm_bash_script ). I also set:
agent.package_manager.system_site_packages = true agent.package_manager.post_packages = ["PyJWT==1.7.1"]To make sure to have the right version of PyJWT when running an experiment. Still, even with all these safeguards, the agent installs PyJWT==2.0.0 and the experiment fails with:
File "/root/.trains/venvs-builds/3.6/lib/python3.6/site-packages/trains/backend_api/session/session.py", line 171, in __init__ self.refresh_token() File "/root/.trains/venvs-builds/3.6/lib/python3.6/site-packages/trains/backend_api/session/token_manager.py", line 95, in refresh_token self._set_token(self._do_refresh_token(self.__token, exp=self.req_token_expiration_sec)) File "/root/.trains/venvs-builds/3.6/lib/python3.6/site-packages/trains/backend_api/session/token_manager.py", line 77, in _set_token self.__token_expiration_sec = self._get_token_exp(token) File "/root/.trains/venvs-builds/3.6/lib/python3.6/site-packages/trains/backend_api/session/token_manager.py", line 72, in _get_token_exp return jwt.decode(token, verify=False).get('exp', sys.maxsize) File "/root/.trains/venvs-builds/3.6/lib/python3.6/site-packages/jwt/api_jwt.py", line 113, in decode decoded = self.decode_complete(jwt, key, algorithms, options, **kwargs) File "/root/.trains/venvs-builds/3.6/lib/python3.6/site-packages/jwt/api_jwt.py", line 80, in decode_complete 'It is required that you pass in a value for the "algorithms" argument when calling decode().' jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode().Any idea how can I solve this problem? I cannot upgrade trains at the moment to ClearML, but I was expecting either system_site_packages or post_packages to work?

  
  
Posted 3 years ago
Votes Newest

Answers 17


I can ssh into the agent and:
source /trains-agent-venv/bin/activate (trains_agent_venv) pip show pyjwt Version: 1.7.1

  
  
Posted 3 years ago

Sure. JitteryCoyote63 so what was the problem? can we fix something?

  
  
Posted 3 years ago

Ok, by setting PyJWT==1.7.1 in the setup.py of the experiment pip did not enforced the update

  
  
Posted 3 years ago

but the post_packages does not reinstalls the version 1.7.1

  
  
Posted 3 years ago

So it's good now?

  
  
Posted 3 years ago

venv mode

  
  
Posted 3 years ago

Hi JitteryCoyote63 ,
I assume the agent installs PyJWT when setting up to run your experiment?

  
  
Posted 3 years ago

Are you using the agent in docker or venv mode?

  
  
Posted 3 years ago

Let me check...

  
  
Posted 3 years ago

You already fixed the problem with pyjwt in the newest version of clearml/clearml-agents, so all good 😄

  
  
Posted 3 years ago

so most likely one hard requirement installs the version 2 of pyjwt while setting up the experiment

  
  
Posted 3 years ago

yes -> but I still don't understand why the post_packages didn't work, could be worth investigating

  
  
Posted 3 years ago

Hey JitteryCoyote63 I think I need to better explain the config feature:
agent.package_manager.post_packages = ["PyJWT"]Basically this means that IF you have pyjwt in the installation package it will be installed after everything else is installed.
This doesn't mean it will always be installed.
Think for example "horovod" has to be installed after you have TF / PyTorch installed.
(The same goes for "pre_package" and Cython)

  
  
Posted 3 years ago

hooo now I understand, thanks for clarifying AgitatedDove14 !

  
  
Posted 3 years ago

Hi SuccessfulKoala55 , yes indeed

  
  
Posted 3 years ago

Indeed, will do

  
  
Posted 3 years ago

Note: I can verify that post_packages is well picked up by the trains-agent, since in the experiment log I see:
agent.package_manager.type = pip agent.package_manager.pip_version = \=\=20.2.3 agent.package_manager.system_site_packages = true agent.package_manager.force_upgrade = false agent.package_manager.post_packages.0 = PyJWT\=\=1.7.1

  
  
Posted 3 years ago
531 Views
17 Answers
3 years ago
one year ago
Tags
Similar posts