Book Contents

Book Index

Smart Search (e-shop)

Book Contents

Book Index

E-shop settings in the K2 system

To use the Smartsearch function on the e-shop, it is first necessary to configure Elasticsearch in IS K2. The configuration is described in more detail in the section Elasticsearch - Configuration in K2.

The next step is to set up the specific e-shop to use searching via Elasticsearch.

In the Websites and e-shops book, switch to change mode on the record for the given e-shop and press the Web and e-shop settings button. On the Searching tab, check Use Smart Search searching.

pic_9875_202602

Picture: Use Smart Search searching

On the Smart Search settings tab, we define the search areas for the autocomplete and for the search results.

pic_9878

Picture: Elasticsearch indexes settings

Using the Elasticsearch indexes settings button, we open the Elasticsearch indexes configuration.

The Default indexes settings button generates the basic indexes and fills in the required data:

pic_9971_202403

Picture: Indexes settings

Note: Clicking a created index opens a form with its detailed configuration. For each index, you can set which fields are to be exported from K2 and how the search query is to be built. The search query directly affects the results obtained on the website; you can influence the priority of individual analyzers and fields (name, description, …). A detailed description of the options for creating search queries is beyond the scope of this documentation. It is described in detail in the Elasticsearch documentation.

The Create all indexes button creates all the required indexes in Elasticsearch. Successful creation of the indexes is confirmed by a message.

pic_5534_2024

Picture: Successful creation of indexes

Finally, we confirm all dialogs and save the record in the Websites and e-shops book.

In the Elasticsearch indexes settings, Indexes table, we can set optional parameters for the individual segments of search results. For example, with the Article index type selected, the administrator uses checkboxes to choose which synchronizations are to be propagated (exported) within the update on the given segment.

pic_6977_202604

Picture: Index type - synchronization

Description of fields:

Take Zero warehouse text into account in the availability filter

Available only if the "Update article availability" parameter is checked.

In the Availability filter, in addition to the In stock option, values from the Zero warehouse text field will also be displayed. For example:

  • Within 5 days
  • Within 10 days
  • For order

 

Values are displayed in the filter according to these rules:

  • Articles with availability greater than 0 are displayed under the In stock value.
  • Articles with availability 0 and a filled-in "Zero warehouse text" field are displayed as a separate filter value according to the entered text (e.g. For order).
  • Articles with availability 0 and an empty "Zero warehouse text" field are not displayed in the Availability filter.

Update identification numbers

Searching only in full search.

If the Number type field is not filled in, all items are uploaded to Elastic. If the Type value is filled in, only the identification numbers that have exactly this type filled in are uploaded.

Update barcodes

Searching only in full search.

Update searched words

Searching in both the autocomplete and full search. Searched words are searched via the translated description; if it is not entered, then via the abbreviation.

Use phrase suggestions

The Use phrase suggestions option is used to automatically complete words and multi-word expressions while typing a search query in the autocomplete on the e-shop. When the option is switched on, the autocomplete:

  • does not search only from the beginning of the string,
  • but works with the entire name or phrase,
  • or splits the query into individual words.

 

Combine words from the article name

If the Combine words from the article name option is switched on, the product name is split into several parts.

Example:

For the name Rock Machine Powerflex, Machine Powerflex and Powerflex will also be generated as phrase suggestions.

The user can thus start typing any word from the product name (even in the middle) and the autocomplete will offer the corresponding completion.

 

Suggest category names

The names of e-shop categories are also included in the autocomplete, which allows quick navigation directly to a specific part of the product range.

 

Suggest brand names

Brand names (e.g. K2, Ghost, Powerflex) are also included in the Elasticsearch index. These brands are then displayed in the autocomplete as separate suggestions.

 

Suggest searched words from articles

Values from the Searched words field of all article cards published on the e-shop are also included in the autocomplete. This function makes it possible to work with alternative names, synonyms or trade names of products.

Book Contents

Book Index

Data import to Elasticsearch

After the basic configuration and creation of indexes, it is necessary to export the data to Elasticsearch. For the first upload of data, or to force a manual update, you can use the actions available in the browse over the form with the indexes settings (see the previous chapter).

3 functions are available:

After these actions are started, a dialog with a summary is displayed, or a list of error states for individual records.

Book Contents

Book Index

Automatic data update in Elasticsearch

To ensure automatic data updates in Elasticsearch, there is a special scheduled task that performs incremental data updates in Elasticsearch. This scheduled task works on the principle of so-called time stamps (Timestamp fields), according to which it selects records changed since the last update and exports only these changed records from K2.

The scheduled task is available in the action menu - Web and e-shop / Elasticsearch: data update for e-shop/web.

The only parameter of the scheduled task is the selection of the e-shop whose data this scheduled task is to update.

pic_5535_2024

Picture: Substitute "Elasticsearch: data update for e-shop/web"

Book Contents

Book Index

K2 e-shop settings for using Elasticsearch

To use Elasticsearch, it must also be configured on the side of the K2 E-shop located on the web server. A separate configuration is necessary because of the recommended placement of the website/e-shop in the DMZ, where Elasticsearch is likely to be available under a different name/IP address than from the internal domain environment. The following lines must be added to the configuration file config.php:

$CONFIG['elasticEnabled'] = true;
$CONFIG['elasticHosts'] = [
  [
    'host' => 'k2providerweb',
    'port' => 9200,
    'scheme' => 'http'
  ]
];

Book Contents

Book Index

Search results and autocomplete on the website

The appearance of the autocomplete and the search results is different when Smart Search is used on the website than in the case of classic searching.

According to the settings in K2, the results include, in addition to products, also categories, product brands, blog posts or category parameters (e.g. mountain, children's, etc.)

The matching text is always highlighted in the autocomplete.

pic_5553

Picture: Autocomplete on the website

On the search results page, the found brands are listed first at the top, then categories and only then specific products. This allows further filtering. It offers the option of sorting products by default, code ascending and descending, name ascending and descending, price ascending and descending, and recommended.

pic_5554.png

Picture: Search results

If a large number of products is found for the searched expression, the user is shown a warning with the approximate number and only the first 500 products are displayed.

Book Contents

Book Index

Search without query

If Search without query is set, see the chapter Search settings tab, the autocomplete starts offering suggestions even before the user enters any text into the search field. This function improves clarity and makes orientation easier for e-shop users already at the first click into the search field.

The autocomplete can offer the user:

pic_1703431

Picture: Smartsearch autocomplete - Search without query

Book Contents

Book Index

Phrase suggestions

If Use phrase suggestions is set, see the chapter E-shop settings in the K2 system, the autocomplete does not search only from the beginning of the string, but works with the entire name or phrase, or splits the query into individual words.

pic_1703432

Picture: Smartsearch autocomplete - Phrase suggestions

Synonyms for Smart search searching

Customers may use different terms when searching for the same product. For example, one customer searches for "glasses", while another enters "spectacles". If the search does not work with synonyms, the customer may not find the required product even though it is offered by the e-shop.

Synonyms allow you to define words with the same or similar meaning. The search can then offer the corresponding products regardless of which of the defined expressions the customer uses.

Condition: To use synonyms, the e-shop must use searching via Smart search.

pic_1703896

Picture: Synonym searching on the e-shop

Procedure for setting up synonyms

To enable searching using synonyms, the following steps must be performed:

  1. Create a set of synonyms and define rules in the Elasticsearch synonyms configuration module.
  2. Send synonyms to Elasticsearch.
  3. Edit the index template to use synonyms (one-time).
  4. Set the index search fields in which synonyms are to be used (one-time).
  5. Create indexes and perform a complete data import (one-time).
  6. Verify the search functionality on the e-shop.

Note: Steps 3–5 are performed only during the initial setup. For subsequent changes to synonyms, it is enough to change the rules and send the updated set to Elasticsearch. It is not necessary to recreate the indexes or perform a complete data import.

Book Contents

Book Index

Elasticsearch synonyms configuration

Synonym sets are defined in the Elasticsearch synonyms configuration module, which is available from the tree menu Web and e-shop - Administration and settings - Elasticsearch synonyms configuration.

A synonym set is a named group of rules that determine mutually related expressions. Separate sets can be created for different language versions of the e-shop.

pic_1703893

Picture: Elasticsearch synonyms configuration

pic_1703894

Picture: Set definition

Description of fields:

Name

Specifies the name of the synonym set. The name must not contain spaces or diacritics. Letters, digits and the characters _, -, . are allowed. For example eshop_cs. The name is subsequently used when configuring the index template.

Description

Allows you to enter a more detailed description of the synonym set, for example "E-shop – Czech".

For e-shop / K2

If the field is checked, the synonym set is intended for searching on the e-shop.

Rules

Used to define synonyms.

  • Bidirectional synonyms - Expressions with the same or similar meaning are written on one line and separated by commas (e.g. bike, bicycle, cycle). When using bidirectional synonyms, searching for any of the listed expressions can also find products containing the other expressions from the same rule.
  • Unidirectional synonyms - if a synonym is to be used in one direction only, the rule is written using an arrow (e.g. mobile => mobile phone). When searching for the expression "mobile", products labelled as "mobile phone" can thus also be found. However, the rule does not ensure the opposite direction.

Empty lines and lines starting with the # character (comments) are ignored.

Tip: If we also want to take into account searching without diacritics, you can define both variants of the expression, for example koloběžka, kolobezka.

Sending synonyms to Elasticsearch

After creating or modifying a synonym set, it is always necessary to send it to Elasticsearch. Synonyms can be sent in two ways:

During the initial setup of synonyms, after sending them to Elasticsearch, it is further necessary to perform the index template configuration, setting of search fields and creation of indexes with a complete data import.

For subsequent changes to synonyms, it is no longer necessary to repeat these steps.

To update synonyms, it is enough to:

The changes made take effect in searching immediately after they have been sent successfully.

Automatic update of synonyms

Synonyms can also be sent to Elasticsearch automatically via scheduled tasks for updating Elasticsearch data, for example Elasticsearch: data update for e-shop/web.

During an automatic update, only the synonym sets that have changed since they were last sent are sent. It is therefore not necessary to run a complete data import or recreate indexes after each modification of the rules.

Book Contents

Book Index

Elasticsearch configuration - modifying the index template

After creating a synonym set and sending it to Elasticsearch, it is necessary to modify the index template so that the synonyms are used during searching.

The index template determines how Elasticsearch processes the searched text. Among other things, it contains filters and analyzers that determine which modifications are made to the text and in what order.

Explanation of terms:

In Web and e-shop / Administration and settings / Elasticsearch configuration, on the Templates tab, we open the template of the corresponding language version, for example web_search_cs.

pic_1703892

Picture: Elasticsearch configuration - index templates

Three modifications must be made in the Index definition:

  1. Create a synonym filter – First, we tell Elasticsearch which synonym set to use. In the filter section, we add a new filter of the synonym_graph type, which refers to the created synonym set, for example eshop_cs.
  2. Create an analyzer for searching with synonyms – In the analyzer section, we create the hunspell_synonyms analyzer based on the existing hunspell analyzer and add the synonym filter to it. The filter must be listed after lowercase and before min_length.
  3. Modify the autocomplete analyzer – We add the synonym filter after lowercase to the autocomplete_search analyzer so that synonyms are also taken into account when suggesting results.

pic_1703890

Picture: Template web_search_cs with added synonyms

1) Adding a synonym filter

We add the following to the filter section:

"synonyms_eshop_cs": {
  "type": "synonym_graph",
  "synonyms_set": "eshop_cs",
  "updateable": true
}

Legend:

synonyms_eshop_cs

The name of the new filter we are creating.

synonym_graph

A filter type that can also work with multi-word synonyms.

synonyms_set

The name of the synonym set stored in Elasticsearch.

updateable: true

Allows synonyms to be updated without having to recreate the index, provided the Elasticsearch conditions are met.

We have thereby created a filter that can work with our synonyms. However, we have not yet determined when it is to be used.

2) Including synonyms in regular searching

In the second step, we create the hunspell_synonyms analyzer. It is based on the existing hunspell analyzer, but additionally contains the new synonym filter.

"hunspell_synonyms": {
  "filter": [
    "lowercase",
    "synonyms_eshop_cs",
    "min_length",
    "czech_hunspell",
    "czech_stopwords",
    "icu_folding",
    "unique"
  ],
  "char_filter": ["html_strip"],
  "tokenizer": "standard",
  "type": "custom"
}

When processing text, Elasticsearch proceeds according to the order of the listed filters.

Why does the order matter?

The min_length filter removes words that are too short. If we used it before the synonym filter, it could remove short words even before the rule is processed. This can cause an error when loading the synonym set. Therefore, in this configuration, the synonym filter must be listed before the min_length filter.

pic_1703891

3) Including synonyms in the autocomplete

The last step concerns the autocomplete, i.e. the offer of results displayed to the customer while typing into the search field. So that the autocomplete also works with synonyms, we add the filter to the autocomplete_search analyzer:

"autocomplete_search": {
  "filter": [
    "lowercase",
    "synonyms_eshop_cs",
    "icu_folding"
  ],
  "tokenizer": "standard"
}

Book Contents

Book Index

Elasticsearch indexes settings

After modifying the index template, it is necessary to determine in which article fields synonyms are to be used during searching. The search analyzer setting of the individual index fields is used for this.

Setup procedure:

  1. In the Elasticsearch indexes settings (Websites and e-shops, Searching / Smart Search settings tab), we open the index of the Article type and go to the Index fields tab.
  2. We click the Name field. In the Fields table, we open the hunspell row and enter hunspell_synonyms in the Search Analyzer field.
  3. In the same way, we also set the hunspell_synonyms analyzer for the ShortDescription, Description and EshopSearchWords fields.
  4. We confirm the changes with the OK buttons and save the e-shop settings.

Now, the defined synonyms will be taken into account when searching in the name, short and long product description and search words.

pic_1703895

Picture: Search analyzer setting for index fields

Book Contents

Book Index

Creating indexes and data import

After setting the search fields, it is necessary to create the Elasticsearch indexes and fill them with data from the e-shop.

Important: Before the indexes are created, the synonym sets must already have been sent to Elasticsearch (see Elasticsearch synonyms configuration). Otherwise, the indexes using synonyms cannot be created.

Procedure:

  1. In the Elasticsearch indexes settings window, we click the Create all indexes button.
  2. After the indexes have been created, we click the Complete data import. button. Depending on the amount of data, the import may take several minutes.

After the import is completed, we can verify that synonym searching works on the e-shop.

Book Contents

Book Index

Evaluation of search functionality

After Elasticsearch has been deployed, it is advisable to evaluate after some time how well the analyzers and search query definitions used work for the specific data of the specific e-shop. To evaluate the searched words and expressions, it is advisable to deploy Google Analytics on the website. The K2 e-shop will then send events to Google Analytics for each search and each display of the autocomplete. In addition to the list of the most frequently searched expressions on the website, we also obtain a list of expressions for which no results were displayed. If such words occur repeatedly, it is necessary to find out why users get no results for these expressions. Either the searched phrases need to be included in the names and descriptions of categories and products, or the Smart Search settings need to be optimized.

Information about searched expressions is available in Google Analytics in the Behaviour/Events section. These are events of the search category – full search results and searchAutocomplete – autocomplete display results.

Each of these categories is further divided:

In addition to event tracking, it is also recommended to configure the standard search analysis within Google Analytics (Behaviour/Site Search section). However, this section displays only the results of full searches; it does not take into account the path through the autocomplete. To set up data filling into this section, it is necessary to switch on the Site search tracking option in the website configuration on the Google Analytics pages in the data selection Settings section and fill in the URL Parameter with the value search.

Book Contents

Book Index

Artificial intelligence

Book Contents

Book Index

Field value recommendation

Book Contents

Book Index

Hardware and software requirements

The requirements apply to the server on which the AI service runs. The K2 client only communicates with the service over the network.

Software

Hardware

Processor (CPU)

The solution does not require a graphics card and fully supports running on common server processors.

Recommended configuration:

Volume of new documents per year

Recommended processor

Thousands

4 CPU threads

Tens to hundreds of thousands

8 CPU threads

Hundreds of thousands to millions

10 - 32 CPU threads

Optional.

If an NVIDIA graphics card with CUDA support is available, the AI service automatically uses it to speed up model training. A GPU is not necessary for common data volumes.

Memory (RAM)

The highest memory requirements arise during model training.

We recommend at least 16 GB of free RAM.

Disk space

Models and their metadata require tens to hundreds of MB. However, it is also necessary to allow space for:

We recommend at least 50 GB of free disk space.

Book Contents

Book Index

Recommended deployment and maintenance procedure

1. Preparation

Verify that the AI service is running, is available and has access to the K2 database. In the form, switch on the option "Take over API connection according to K2 configuration", or fill in the service address and database manually.

2. Data check (optional)

Run Data extraction and check the generated CSV file. Verify that it contains enough historical documents and that the exported data meet expectations.

3. First model training

Run Training a new model (complete) with the default settings. You can monitor the training progress in the Currently running training overview.

4. Evaluation of model quality

In the Training history overview, open the detail of the completed training and check the achieved metrics (e.g. Hit@1, Hit@5, ECE). Based on the results, assess whether the model achieves the required success rate.

5. Switching on AI recommendation

Switch on the option "Enable field value recommendation using AI" and set the Number of recommended records as needed.

6. Regular maintenance

We recommend scheduling incremental retraining, for example once a week at night, so that the model continuously uses newly created data.

7. Complete retraining

After significant changes to data or configuration, we recommend running complete model training again.

Book Contents

Book Index

Troubleshooting

Problem

Possible cause / solution

The solution does not offer any suggestions

Check whether the option "Enable field value recommendation using AI" is switched on, whether the AI service is available and whether at least one model has been trained.

Training ends with the status Failed

Details can be found in the message in the Training history. The most common cause is an unavailable database, incorrect login credentials or a connection error.

"No new data since the last training"

Incremental retraining did not find any new data to add. This is not an error.

Another training cannot be started (conflict)

The same type of training is already in progress. Wait for it to finish or check the Currently running training overview. After the service is restarted, any unfinished runs are removed automatically.

The new model was not deployed

The newly trained model did not achieve better results than the current production model. To maintain quality, the original model remains deployed and the message Production model unchanged is displayed.

High success rate for Codes 1–6 (100 %)

This is expected behaviour. The Code 1–6 fields usually contain a smaller number of possible values, and therefore the model achieves very high accuracy.

"Accuracy (rare classes)" = 0 and number of samples 0

There are no rare values in the input data, so this metric cannot be evaluated. This is not an error and the metric can be ignored in this case.

Book Contents

Book Index

Glossary of terms

Book Contents

Book Index

Validation and validation metrics

After training is completed, the model quality is verified on the validation set – a part of the historical data that was not used for learning. The model predicts values on these data and the results are compared with reality.

Summary data:

Data item

Meaning

Interpretation

Training loss (Train Loss)

The model error on the training data.

Lower = better.

Training perplexity

The degree of uncertainty of the model on the training data. A value close to 1.0 = the model is very decisive.

The closer to 1, the better.

Total training time (ms)

The time needed to train the model.

Informative data.

Validation loss (Validation Loss)

The model error on the validation data.

Lower = better. Usually more important than the training loss.

Validation perplexity

The degree of uncertainty of the model on the validation data.

The closer to 1, the better.

Total validation time (ms)

The time needed to evaluate the model.

Informative data.

Perplexity expresses the degree of uncertainty of the model during prediction. A value of 1 means that the model is very confident in its decisions (the model is always sure of one value). The higher the value, the greater its uncertainty (the model hesitates between "n" values).

Book Contents

Book Index

Success metrics (Hit / MRR / NDCG)

The metrics are evaluated separately for each target field and for several values of K (1, 3, 5, 10, 20 and 50). The Top-K value denotes the first K recommended results.

Metrics

Meaning

Interpretation

Hit@K

Indicates how often the correct value is among the first K recommendations.

A higher value is better.

Example:

  • Hit@1 = 60 % › in 60 % of cases, the very first suggestion was correct.
  • Hit@5 = 90 % › in 90 %, the correct value was among the first five.

MRR

Evaluates the rank of the correct value in the list of recommendations.

A value closer to 1 = the correct value tends to be in the first places

NDCG

Evaluates the quality of the order of recommended values.

A value closer to 1 = means better results.

In practice, the most important metrics are Hit@1 and Hit@5:

For fields with a small number of possible values (e.g. Code 1–6), it is common to achieve a success rate of 100 %.

Book Contents

Book Index

Calibration and success rate on frequent and rare values

Metrics

Meaning

Interpretation

ECE (Expected Calibration Error)

Expresses how well the confidence of the model corresponds to the actual success rate of its predictions.

Lower = better.

Accuracy (frequent classes)

The prediction success rate for frequently occurring values.

A higher value is better.

Number of samples (frequent classes)

The number of validation records used to calculate the metric.

Informative data.

Accuracy (rare classes)

The prediction success rate for rarely occurring values.

A higher value is better.

Number of samples (rare classes)

The number of validation records used to calculate the metric.

If the value is 0, no rare values occurred in the validation data. This is not an error.

The division into frequent and rare values helps to assess whether the model can correctly recommend not only the most frequent values but also less common cases. When evaluating the results, it is always advisable to also take into account the number of samples from which the metric was calculated.

Book Contents

Book Index

Parameters

The parameter settings are intended primarily for advanced users. The default values are verified and for most deployments there is no need to change them.

Book Contents

Book Index

Model parameters (architecture)

These settings determine the model architecture and can be modified only during complete training. During incremental retraining, the architecture is taken over from the current production model.

Description of parameters:

Parameter

Default

Description

Use DCN (Deep Cross Network)

On

Switches on the part of the model that focuses on combinations of input field values (e.g. book × document type).

Use Transformer

Off

Switches on the Transformer as a supplementary part of the model. For most scenarios, its use is not necessary.

Number of DCN layers

3

Determines the number of DCN layers. A higher value allows the model to capture more complex relationships between fields, but extends the training time and may increase the risk of overfitting.

Number of Transformer layers

1

Determines the depth of the Transformer, if used.

Number of Transformer heads

4

Determines the number of parallel attention mechanisms (attention heads) in the Transformer.

Embedding dimension multiplier

4,0

Determines the size of the vector representation of field values. A higher value increases both the model capacity and its memory requirements.

Minimum embedding dimension

4

Determines the minimum embedding size for individual fields.

Maximum embedding dimension

256

Determines the maximum embedding size for individual fields.

Hidden head dimension

1024

Determines the size of the decision part of the model. A higher value increases the model capacity, but extends training and increases memory requirements.

Shared dropout

0,1

Determines the dropout rate in the shared part of the model. A higher value helps to limit overfitting (0–1).

Head dropout

0,3

Determines the dropout rate in the decision part of the model. A higher value helps to limit overfitting.

0,3

Book Contents

Book Index

Training parameters (hyperparameters)

These settings affect the course of model training, not its architecture.

Basic

Parameter

Default

Description

Batch size (Batch Size)

4096

Determines the number of documents processed in one training step. A higher value increases memory requirements.

Maximum learning rate (OneCycleLR)

0,001

Determines the maximum value of the learning rate during complete training.

Weight decay (Weight Decay)

0,02

Determines the degree of regularization, which helps to limit model overfitting.

Number of epochs

50

Determines how many times the model passes through all the training data (complete training).

Random seed

42

Ensures repeatability of results with the same training settings.

Selection of training data

Parameter

Default

Description

Time weight exponent

2,5

Determines how much weight newer data have during training. A higher value favours newer documents more.

Training years window

10

Determines the number of recent fiscal years included in training.

Training/validation data ratio

0,9

Determines the ratio of data used for training and validation (0.9 = 90 % for training, 10 % for validation).

Masking and dropout

Parameter

Default

Description

Masking probability

0,3

Determines how often target fields are temporarily hidden during training so that the model learns to predict their values.

Context dropout

0,2

Determines how often context fields are temporarily omitted during training so that the model does not depend on only one input.

Training stability

Parameter

Default

Description

Gradient clipping norm

1,0

Limits the size of gradients and contributes to training stability.

Gamma (focal loss)

2,0

Determines how strongly the model focuses on more difficult cases.

Alpha (focal loss)

1,0

Determines the weight used when calculating the Focal Loss function.

Ramp-up start (OneCycle pct_start)

0,3

Determines at which part of the training the learning rate reaches its maximum.

Incremental retraining

Parameter

Default

Description

Incremental learning rate

0,0001

Determines the learning rate during incremental retraining. A lower value helps to preserve the knowledge of the already trained model.

Incremental number of epochs

100

Determines the maximum number of epochs during incremental retraining. Training may end earlier thanks to the Early Stopping mechanism.

Early stopping patience

5

Determines the number of epochs without improvement after which training is automatically terminated.

Amount of historical data for retraining

0,5

Determines the proportion of historical data added to new data so that the model retains previously acquired knowledge.

Plateau scheduler (fine-tuning of the rate)

Parameter

Default

Description

Plateau Scheduler factor

0,5

Determines by how much the learning rate is reduced if the model stops improving.

Plateau Scheduler patience

3

Determines the number of epochs without improvement after which the learning rate is reduced.

Plateau Scheduler minimum learning rate

0,000001

Determines the lowest learning rate value below which the scheduler no longer drops.

Book Contents

Book Index

K2 Monitoring in IS K2

To access K2 Monitoring, the user must have login credentials set. They must be requested from the service team or a sales representative. At the same time, the user must be linked to a contact person. Without this link, Monitoring cannot be used.

pic_1703580

Picture: Error message when logging in

After the contact person has been set, the user switches to the Web, e-shop tab, where they set the login credentials for K2 Monitoring. The login is always set on the contact person. The Monitoring option must be selected in the Web field.

pic_10967

Picture: Contact persons book - Web, e-shop tab

If the Monitoring record does not exist in the Login to web, e-shop code list, it must be created. In the form for a new record, only the Abbreviation and Description fields are filled in. The record is then saved.

pic_10968

Picture: Creating the Monitoring item in the code list

Book Contents

Book Index

Notifications from monitoring

Notifications can be sent from K2 Monitoring based on the processed data. Notifications are sent in the form of e-mails, which the user sets directly in the IS K2 environment. The settings are available in the tree menu Administrator - System - K2 Monitoring settings.

When K2 Monitoring is started for the first time, a registration form is displayed to the user. To use it, it is necessary to register first. During registration, it is also checked whether the given company has access to K2 Monitoring.

pic_10000_1

Picture: Registration to the notification system

Name and Surname are prefilled according to the currently logged-in user (contact person). If the e-mail is not filled in, add it and click the Register button. After successful registration, a table for entering and managing notifications is displayed.

pic_10000_2

Picture: List of notifications

We insert a new record by clicking the New button.

pic_10000_3

Picture: Creating a new notification

Warning name

Used to name the notification. This name is also used in the e-mail subject.

Interval

Determines how often the given event is checked in K2 Monitoring. The value is stated in seconds.

Check kind

For each notification, it is necessary to select the check kind. Individual kinds may require specific input data.

Active

The rule can be activated / deactivated.

Warning message

The text that is sent by e-mail for the given notification. Macros, which are dynamically filled in for the given rule, as well as symbols for text formatting can be inserted into the text.

The following check kinds are currently available:

Check kind

Description

Input parameters

K2 e-shop functionality check

The notification is sent when the specified K2 e-shop is not available.

Url - the web address of the K2 e-shop that will be checked

Elasticsearch functionality check on the K2 e-shop

The notification is sent when ES for the specified K2 e-shop is not available.

Url - the web address of the K2 e-shop that will be checked

Redis functionality check on the K2 e-shop

The notification is sent when Redis for the specified K2 e-shop is not available.

Url - the web address of the K2 e-shop that will be checked

Error in K2 contains text

The notification is sent when an error contains the specified text.

Text in the error message - keyword(s) contained in the error message

A script or report ran longer than the specified time

The notification is sent when the specified object has been running longer than specified.

Script or report name - name

Duration time - length in seconds

A module was started

The notification is sent when the specified module is started.

Module identifier (classname) - module identification (e.g. TInvoiceOutDM)

A script or report was started

The notification is sent when the specified object is started.

Script or report name - name

The list is shown in a window that can be invoked in the notification using the button highlighted in the picture.

pic_10000_4_1

Picture: Notification definition - help for notification text

The list of possible macros and formatters is shown in the picture.

pic_10000_5

Picture: List of macros and formatters

Notifications can be edited, activated / deactivated and deleted. After the above changes, they are saved by pressing the "Save" button or the "Ok" button.

Changes to notifications start to be applied no later than 1 hour after they are saved.

Book Contents

Book Index

Use of custom scripts and print reports

The module provides an overview of the use of custom scripts and reports in IS K2. It allows users to monitor how often individual scripts and reports were run during the selected period. This makes it easy to find out which are used most often and which, on the contrary, are not used. The module is available under the name Use of scripts and reports, number 1966, and the data are obtained from K2 Monitoring.

To access the module, the user must have an account for K2 Monitoring created and set in IS K2. The procedure for setting up access is described in the chapter Access to K2 Monitoring in IS K2.

After logging in, a book with a list of all scripts and reports opens. Below the ribbon, there is a calendar in which the user selects the period for which they want to monitor their runs. Scripts and reports that were not run during this period are marked with a red background. Using the available functions, scripts and reports can not only be displayed but also opened for editing. Pressing the Enter key or double-clicking the selected script opens the Scripts and reports module (if the object is available in this module). The charts at the bottom of the window provide an overview of the type of modification and the success of their compilation.

pic_1703587

Picture: Opened book Use of scripts and reports

Description of the fields of the Use of scripts and reports table:

Jump to record

Opens the selected script or report in the list.

Open in editor

Opens the selected script or report in the editor. The keyboard shortcut Alt+F5 can be used.

Load classification in F9

Loads the list of scripts and reports from the module and displays their classification in the F9 window of Data modules. It also shows whether the script is registered.

Compilation test

Verification of compilability of scripts - all or selected.

Path

Storage location of the script or report,

Type

Object type - script or report.

Number

Number of runs for the selected period.

Compilation status values:

Success

Compilation completed without errors.

Error

An error occurred in the script or report.

Failure

The script or report was not found.

Warning

Warning of a problem in the script or report.

Unverified

The script or report did not pass the check.

The compilation result is also displayed in column K.

After selecting the Open in editor option, the selected script opens and the user can view its structure, make modifications and save changes.

pic_1703588

Picture: Script opened in the editor

For individual reports and scripts, you can find out in which data modules they are classified, whether it is a registered script or whether they are used in the task scheduler. Everything can be seen in the list in the upper right part of the book in the F9 Data modules menu.

pic_1703592

Picture: Assigning a task to the scheduler

Book Contents

Book Index

Unused scripts and reports – print report

File: UnusedScriptsAndReports.AM

K2 sends information about run reports and scripts to K2 Monitoring. Using this report, the administrator can generate statistics on customer (special) scripts and reports that were not run in the selected period. Before running the report, it is necessary to enter the period for which the statistics are to be created.

pic_1703478

Picture: Parameters for running

To run the report, the user must have login credentials for K2 Monitoring set. To access the module, the user must also be linked to a contact person. The setup procedure is described in the chapter Access to K2 Monitoring in IS K2.

pic_1703479

Picture: Error message - user without login credentials

After the report is run, the unused scripts and reports for the selected period are displayed. The output can be used to identify unused objects and subsequently optimize or remove them.

pic_1703480

Picture: List of unused scripts and reports