Skip to content
Grigori Fursin edited this page Sep 11, 2016 · 3 revisions

[ Home ]

Table of Contents

Searching by repo,module or data UOA

It is possible to list CK entries by repository, module and entry alias and UID together with wildcards as following:

 $ ck list (repo_uoa):(module_uoa):(data_uoa)

For example, it is possible to list all shared benchmarks via

 $ ck pull repo:ctuning-programs
 $ ck list program
 $ ck list program:*susan*

The same function can be invoked from the modules as following:

 r=ck.access({'action':'list',
              'repo_uoa':UOA or wildcard,
              'module_uoa':UOA or wildcard,
              'data_uoa':UOA or wildcard})
 if r['return']>0: return r
 lst=r['lst'] # List of entries in a special format

 import json                       # Print list
 ck.out(json.dumps(lst, indent=2)) # to understand its structure

Searching by date and time of creation

It is also possible to list entries when the following constraints are met using the following options:

  • --add_if_date_before - add only entries with date before this date
  • --add_if_date_after - add only entries with date after this date
  • --add_if_date - add only entries with this date
where date is in ISO format (YYYY-MM-DDTHH-MM-SS). However, such search is slightly slower, since it loads info.json from each touched entry

It is possible to search by user-friendly name (description) using the following option (with wildcards):

  • --search_by_name
It is also possible to limit number of returned entries using the following option:
  • --limit_size

Searching by tags and basic string

It is possible to search entries via meta-description match by string or key/value pairs as following (note that it is slow because meta.json of each entry is loaded, unless you use ElasticSearch indexing for CK):

 $ ck search (repo_uoa):(module_uoa):(data_uoa) tags="tags separated by comma" search_string="regular expression"

Searching by matching part of meta

More complex search should be performed using dictionary in special format:

 $ ck search program: @input.json

where input.json file contains search_dict dictionary to be matched:

 {
   "search_dict":{
     "program_name":"caffe"
   }
 }

See all CK search function API via:

 $ ck search --help

Such search can be very slow since it involves loading meta-description for each entry and recursive search through each key/value pair for each local repository.

Web-based search demo

You can find CK-powered search demo in the live CK repository.

You can also try it on your machine via

 $ ck pull repo:ck-web
 $ ck start web
 $ firefox http://localhost:3344
Clone this wiki locally