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 All! Is There A Way For Trains To Recognize The Cli Arguments When Using

Hi all! Is there a way for trains to recognize the CLI arguments when using https://github.com/google/python-fire instead of argparse?

  
  
Posted 4 years ago
Votes Newest

Answers 12


Sure, I’ll share It through a private message!

  
  
Posted 4 years ago

GrievingTurkey78 can you send the entire log?

  
  
Posted 4 years ago

Yes AgitatedDove14 , I added git user name and password on the trains.conf file. On the results tab of the UI the logs clone command shows the SSH command instead of the HTTPS :
Repository cloning failed: Command ['clone', mailto:'git@gitlab.com : ...

  
  
Posted 4 years ago

GrievingTurkey78 whats the repository link you see in the UI? Does it start with ssh:// or https://
Did you add git_user/git_pass to the trains.conf of the trains-agent ? (if you did it should replace any ssh:// link with https:// user/pass link)

  
  
Posted 4 years ago

I am about to try everything AgitatedDove14 but ran into a gitlab error from the agent, I added the username and password to the configuration file but still get a Host key verification failed . Is it common that the cloning message shows the SSH link instead of the HTTPS when username and password are provided?

  
  
Posted 4 years ago

Thanks GrievingTurkey78 !
It seems that under the hood they user argparser
See here:
https://github.com/google/python-fire/blob/c507c093fa6622ab5efee21709ffbf25974e4cf7/fire/parser.py

Which means it might just work?!
What do you think?

  
  
Posted 4 years ago

AgitatedDove14 I filed an issue of fire for them to point us to the argument parsing method https://github.com/google/python-fire/issues/291

  
  
Posted 4 years ago

I could take a look and figure that out.

This will greatly accelerate integration 😉

  
  
Posted 4 years ago

Yes, exactly! Unfortunately I am not so familiar with the internals of the library but I could take a look and figure that out.

  
  
Posted 4 years ago

Just making sure I understand, basically same ArgParser support we already have, but for python-fire (which is the ability to automatically log the arguments, and then change them when executed by trains-agent), correct?
If this is the case, are you familiar with the implementation of python-fire ? What I'm looking for is where exactly the parsing happens, so we could patch it, and log/override values

  
  
Posted 4 years ago

Yes, it’s similar; somewhat more automatic since it detects the classes of functions arguments and generates the CLI. What do you mean by that AgitatedDove14 get all the parameters and use task.connect ?

  
  
Posted 4 years ago

Hi GrievingTurkey78
I'm assuming similar to https://github.com/pallets/click/
?
Auto connect and store/override all the parameters?

  
  
Posted 4 years ago
915 Views
12 Answers
4 years ago
one year ago
Tags