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 I'M Using Latest Versions And Experiencing A Bug. I Created A Controller In A New Project. Just After That I Clone A Task And Give It The New Project Name To Clone Into. It Fails To Create The Task: Code:

Hi I'm using latest versions and experiencing a bug. I created a controller in a new project. Just after that I clone a task and give it the new project name to clone into. It fails to create the task:
Code:
task = Task.init(project_name=self.regression_config.regression_project_name, task_name=regression_block.block_name, task_type=Task.TaskTypes.controller, reuse_last_task_id=False) pipe = PipelineController(default_execution_queue=self.regression_config.queue, add_pipeline_tags=True) base_task = Task.get_task(project_name=BASE_TASKS_PROJECT, task_name=BASE_TASKS[block_type][engine]) cloned_task = Task.clone(base_task, project=self.regression_project_name, name=BASE_TASKS[block_type][engine])Error:
File "/home/egarbin/.conda/envs/regression/lib/python3.6/site-packages/trains/task.py", line 782, in clone parent=parent, project=project) File "/home/egarbin/.conda/envs/regression/lib/python3.6/site-packages/trains/backend_interface/task/task.py", line 1664, in _clone_task res = cls._send(session=session, log=log, req=req) File "/home/egarbin/.conda/envs/regression/lib/python3.6/site-packages/trains/backend_interface/base.py", line 89, in _send raise SendError(res, error_msg) trains.backend_interface.session.SendError: Action failed <400/401: tasks.create/v1.0 (Invalid project id: id=first_attempt)> (name=train_inspection, type=training, comment=Auto-generated at 2020-10- 07 08:14:21 UTC by egarbin@bertBut I do see the pipeline created under the new project
I've tried putting between pipe and base_task a 10 second sleep but that doesn't help.

  
  
Posted 4 years ago
Votes Newest

Answers 9


Also, why there is a project id where there is a project name that exists? I don't even know how to display a project's id haha

  
  
Posted 4 years ago

task.project is the project ID (not name)
task.get_project_name() will return the project name

  
  
Posted 4 years ago

Obviously I am working with my trains-server, as I can see the new pipeline task under the new project 😮

  
  
Posted 4 years ago

(The one that was created with initial task)

  
  
Posted 4 years ago

Oh, that seems right, how can I get the project id of the newly created project?

  
  
Posted 4 years ago

That should do the trick, thanks 🙂

  
  
Posted 4 years ago

👍

  
  
Posted 4 years ago

Notice the error code:
Action failed <400/401: tasks.create/v1.0 (Invalid project id: id=first_attempt)>If that is the case, The project ID is incorrect (project id is not the project name)

  
  
Posted 4 years ago

seems like the server returned 400 error, verify that you are working with your trains-server and not the demoserver :)

  
  
Posted 4 years ago
1K Views
9 Answers
4 years ago
one year ago
Tags
Similar posts