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
I'M Running

I'm running clearml-task --script tasks/hp_optimization.py --name "YYYYY" --project "XXXXXXX"
and get the following error - why is that?

Error: Standalone script detected 'tasks/hp_optimization.py', but no requirements provided

ClearML version 1.1.1

  
  
Posted 3 years ago
Votes Newest

Answers 30


Okay SuccessfulKoala55 , problem solved! Indeed the problem was that there is not .git folder. I updated necessary things to make the checkout action get the actual repo and now it works

It wasn't really clear to me what "standalone" means, maybe it will be better to add to the error

Error: Standalone

(no .git folder found)

script detected 'tasks/hp_optimization.py', but no requirements provided

  
  
Posted 3 years ago

working directory is the same relative to the script, but the absolute path is different as the github action creates a new environment for it and deletes it after

  
  
Posted 3 years ago

this means that you supply the machine to execute the actions specified

  
  
Posted 3 years ago

Why is that an issue?

  
  
Posted 3 years ago

SuccessfulKoala55

  
  
Posted 3 years ago

when using the first checkout action, it goes checks out the repo

  
  
Posted 3 years ago

I'll anonimyze it and paste it in a sec

  
  
Posted 3 years ago

I can try something with $(pwd)

  
  
Posted 3 years ago

it is the location of the repo

  
  
Posted 3 years ago

I also ran it without $(pwd) on the Create Clearml task templates section, I added it because of CostlyOstrich36 's comments but it didn't help

  
  
Posted 3 years ago

anyway, my ultimate goal is to create templates for other tasks... Is that possible in any other way through the CLI?

  
  
Posted 3 years ago

Github actions allows to use self hosted runners

  
  
Posted 3 years ago

so when I'm on the machine through SSH

  
  
Posted 3 years ago

id did not help

  
  
Posted 3 years ago

So the question is how come clearml-task can't detect the repo - perhaps the GitHub action checkout doesn't produce a valid for repository and only places the actual files there?

  
  
Posted 3 years ago

SuccessfulKoala55 ⬆ sorry for the delay, was at a meeting

  
  
Posted 3 years ago

I can't specify the absolute path, it is dynamically created

  
  
Posted 3 years ago

I can try do an ls to see what it will print out

  
  
Posted 3 years ago

and I run these command manually

  
  
Posted 3 years ago

` name: XXXXXXXXXX

on:
workflow_dispatch

jobs:
test-monthly-predictions:
runs-on: self-hosted
env:
DATA_DIR: ${{ secrets.RUNNER_DATA_DIR }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.RUNNER_CREDS }}
steps:
# Checkout
- name: Check out repository code
uses: actions/checkout@v2

  # Setup python environment
  - name: Setup up python environment using Poetry
    run: |
      /home/elior/.poetry/bin/poetry env use python3.9
      /home/elior/.poetry/bin/poetry install --remove-untracked

  # Add the repo to PYTHONPATH
  - name: Add repository to PYTHONPATH
    run: echo $(pwd) > $(/home/elior/.poetry/bin/poetry run python -c "print('/'.join('$(/home/elior/.poetry/bin/poetry run which python)'.split('/')[:-2]) + '/lib/python3.9/site-packages/XXXXXXXXXXXX.pth')")

  # Create ClearML task templates
  - name: Create ClearML task templates
    run: |
      /home/elior/.poetry/bin/poetry run clearml-task --script $(pwd)/tasks/hp_optimization.py --name "XXXXXXXXXXXXXXXXXXX" --project "XXXXXXXXXXXXXXXXXXX"
      /home/elior/.poetry/bin/poetry run clearml-task --script $(pwd)/tasks/hpo_n_best_evaluation.py --name "XXXXXXXXXXXXXXXXXXX" --project "XXXXXXXXXXXXXXXXXXX"
      /home/elior/.poetry/bin/poetry run clearml-task --script $(pwd)/tasks/data_projection.py --name "XXXXXXXXXXXXXXXXXXX"  --project "XXXXXXXXXXXXXXXXXXX"

  # Run Monthly predictions for October
  - name: Run October's Monthly Predictions
    run: /home/elior/.poetry/bin/poetry run python tasks/pipelines/monthly_predictions.py "21-10"

  # Run monthly prediction test
  - name: Test predictions
    run: /home/elior/.poetry/bin/poetry run pytest tests `
  
  
Posted 3 years ago

SuccessfulKoala55 seems like you got it spot on, it contains the entire repo, but no .git directory

So what can we do about it? All I want is to create templates for some tasks, so I can later execute them through a Pipelinecontroller

  
  
Posted 3 years ago

WackyRabbit7 can I see the exact setup when running as a GitHub action? What are the arguments for clearml-task exactly? What is the working directory?

  
  
Posted 3 years ago

🙂

$(pwd)/tasks/hp_optimization.py

Is this the location of the repository? Or a single, completely standalone file?

  
  
Posted 3 years ago

but when it is executed through github actions, I get this error

  
  
Posted 3 years ago

it works without any problem

  
  
Posted 3 years ago

Cool! Just to explain, it means clearml-task did not detect a repository (indeed it was not a repository, just a folder with files...), and thus could not deduce the requirements. Standalone means "just a single script to run from some file", but it's still not clear to me why, upon deciding this was not a repository, clearml-task failed to analyze the actual file itself

  
  
Posted 3 years ago

Can you try and specify the exact absolute path? I think that might be the problem.

  
  
Posted 3 years ago

I executed it now with full path, using $(pwd)

  
  
Posted 3 years ago

to see if it contains the .git folder

  
  
Posted 3 years ago

even if it is so

  
  
Posted 3 years ago
1K Views
30 Answers
3 years ago
one year ago
Tags