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
Unanswered
I Have A Second Question As Well, Is It Possible To Disable Any Parts Of The Automagical Logging? In My Project I Use Both Config And Argparse. It Works By Giving Path To A Config File As A Console Argument And Then Allow The User To Adjust Values With Mo


AgitatedDove14 Sorry for my late response I didn't have this slack added on my laptop!
I can't use actual code from my project as it is work related, but this should reproduce the problem:` import argparse
from trains import Task

def main(disable_trains):
disable_trains = disable_trains.lower()
assert disable_trains in ("n", "y", "no", "yes", "true", "false"),
"Invalid input to --disable_trains"
if disable_trains in ("n", "no", "false"):
task = Task.init(
project_name="My project",
task_name="Some experiment",
output_uri="saved_models",
auto_connect_arg_parser=False
)

if name == "main":
# pylint: disable = invalid-name
parser = argparse.ArgumentParser(description="My Project")
parser.add_argument("-dt", "--disable_trains", default="no", type=str,
help="Whether to disable TRAINS (default: no)")
args = parser.parse_args()
main(args.disable_trains) I got around it doing what I said earlier, by putting the import inside the if: import argparse

def main(disable_trains):
disable_trains = disable_trains.lower()
assert disable_trains in ("n", "y", "no", "yes", "true", "false"),
"Invalid input to --disable_trains"
if disable_trains in ("n", "no", "false"):
from trains import Task
task = Task.init(
project_name="My project",
task_name="Some experiment",
output_uri="saved_models",
auto_connect_arg_parser=False
)

if name == "main":
# pylint: disable = invalid-name
parser = argparse.ArgumentParser(description="My Project")
parser.add_argument("-dt", "--disable_trains", default="no", type=str,
help="Whether to disable TRAINS (default: no)")
args = parser.parse_args()
main(args.disable_trains) I will once again repeat, I do not have full insight so maybe this is a difficult problem, but this is my naive suggestion:I do not see why this error: trains.errors.UsageError: ArgumentParser.parse_args() was automatically connected to this task, although auto_connect_arg_parser is turned off!
When turning off auto_connect_arg_parser, call Task.init(...) before calling ArgumentParser.parse_args() Need to occur. Why not connect to argparse in Task.init? If that is not an option, how about: Connect to argparse like you do now, but do nothing about it until Task.init is called. If Task.init has auto_connect_arg_parser=False ` , then discard the information from the argparse (or keep it if that is needed) and disconnect from the argparse. Also, don't push anything to the TRAINS server until you have confirmed in Task.init that the user indeed wants the argparse input.
Valid use case:A setup where you use argparse to select which config you would like to use, in which the actual hyper parameters you would like to log ONLY exist in the config. You do not want to log any of the additional argparse options as they are about picking config or overwriting options in config (leading to duplicate entries on the TRAINS server if argparse is logged).
Is it a niche case:I would not say so, this popular https://github.com/victoresque/pytorch-template uses that exact setup.

  
  
Posted 4 years ago
216 Views
0 Answers
4 years ago
one year ago