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
Hey, I Have A Problem With The Following Task:

Hey, I have a problem with the following task:
` def main(args):
config = yaml.load(open(args.config))

if name == 'main':
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--config', type=str, help='config file path')
parse_args, unknown = parser.parse_known_args()
main(parse_args) The problem is that when I start the experiment from the UI (by cloning a previous one), I get the error: Expected str or bytes or Pathlike object, recieved None . This happens because args.config is None, but in the UI, in my experiment -> configuration tab, the value for config is correctly set. I don't understand why trains does not pass the value for config ` that is given in the UI

  
  
Posted 4 years ago
Votes Newest

Answers 16


I tried removing type=str but I got same problem 😕

  
  
Posted 4 years ago

in the UI the value is correct one (not empty, a string)

  
  
Posted 4 years ago

Ok, so after updating to trains==0.16.2rc0, my problem is different: when I clone a task, update its script and enqueue it, it does not have any Hyper-parameters/argv section in the UI

  
  
Posted 4 years ago

JitteryCoyote63 in the UI what's the value of "config" ? Is it empty, it a string?
Also, could you check if removing the 'type=str' from the add_argument changes the behavior?

  
  
Posted 4 years ago

Hi JitteryCoyote63 ,

I tried to reproduce this issue but it passed for me, what versions do you run (for trains, trains-server and trains-agent)?

  
  
Posted 4 years ago

The cloning is done in another task, which has the argv parameters I want the cloned task to inherit from

  
  
Posted 4 years ago

can you try upgrade? I run it with trains==0.16.2rc0

  
  
Posted 4 years ago

yes 🙂

  
  
Posted 4 years ago

JitteryCoyote63 I think I failed explaining myself.

  1. I think the problem of the controller is that you are interacting (aka changing hyper parameters)) with a Task created using new SDK version, with an older SDK version. specifically we added section names to the hyper parameters, and only new version of the SDK is aware of it.
    Make sense?
  2. Regrading the actual problem. It seems like this is somehow related to the first one, the task at run time is using an older SDK version , and I think this is why it is getting None instead of the value. What do you think?
  
  
Posted 4 years ago

The cloning is done in another task, which has the argv parameters I want the cloned task to inherit from

JitteryCoyote63 What do you mean by that?

Hmmm, make sure the task doing the cloning is using 0.16.1 and above , because with .16 we added sections and the compatibility is between the version. Meaning if you have tasks generated with trains .16 you need trains .16 to clone them from code (so you could properly control the arguments)

  
  
Posted 4 years ago

AgitatedDove14 So what you are saying is that since I have trains-server 0.16.1, I should use trains>=0.16.1? And what about trains-agent? Only version 0.16 is released atm, this is the one I use

  
  
Posted 4 years ago

Hi TimelyPenguin76 ,
trains-server: 0.16.1-320
trains: 0.15.1
trains-agent: 0.16

  
  
Posted 4 years ago

Thanks for the explanations,
Yes that was the case This is also what I would think, although I double checked yesterday:I create a task on my local machine with trains 0.16.2rc0 This task calls task.execute_remotely() The task is sent to an agent running with 0.16 The agent install trains 0.16.2rc0 The agent runs the task, clones it and enqueues the cloned task The cloned task fails because it has no hyper-parameters/args section (I can seen that in the UI) When I clone the task manually using the UI (win trains server 0.16.1), the cloned task do have the hyper-parameters/args section well copied

  
  
Posted 4 years ago

I mean that I have a taskA (controller) that is in charge of creating a taskB with the same argv parameters (I just change the entry point of taskB)

  
  
Posted 4 years ago

JitteryCoyote63 regarding #1, you should probably use Trains 0.16 in the controller

  
  
Posted 4 years ago

my agents are all .16 and I install trains 0.16rc2 in each Task being executed by the agent

  
  
Posted 4 years ago