python learner editable setting

koichikoichi Member Posts: 18 Learner I
Now I'm trying to use python learner.

In the documentation, there is;


The behavior of this operator is defined by a Python script which depending on the operator configuration can be edited by the user.

If the operator is editable, the parameter panel features a set of buttons at the top of the parameter list that allow to edit the declaration (e.g., capabilities and parameter types) and the Python script, as well as to save the configuration as template.

If the operator is not editable, you can check the operator capabilities to learn more about the inputs supported by the preconfigured Python script.       

And head of Operater Declaration of the tutorial. 

Tutorial Process

Classification and regression in a single Python Learner

This example shows how to create a single Python Learner, that supports both classification and regression, and can handle nominal features. In other words, a Python Leaner that behaves very similar to RapidMiner's builtin learners.       

  "name" : "LightGBM",
  "editable" : false,
  "dropSpecial" : true,
  "capabilities" : [ "numerical attributes", "binominal attributes", "polynominal attributes", "polynominal label", "binominal label", "numerical label" ],
  "parameters" : [ {
    "name" : "boosting_type",
    "type" : "category",
    "description" : "Types: ‘gbdt’, traditional Gradient Boosting Decision Tree. ‘dart’, Dropouts meet Multiple Additive Regression Trees. ‘goss’, Gradient-based One-Side Sampling. ‘rf’, Random Forest.",
    "categories" : [ "gbdt", "dart", "goss", "rf" ],
    "value" : "gbdt",
    "optional" : true,
    "advanced" : false

I believe  "editable" paremeter is to set the operator editable.

  "editable" : false,

I have changed the parameter from `false` to `true` but it seems nothing has been changed. 

I was wondering how to set the operator editable and what the the parameter "editable" in the declaration.

And also, once the oprator is set to editable false, how can I clear? 

Best Answer

  • Options
    koichikoichi Member Posts: 18 Learner I
    Solution Accepted
    Thank you for your reply. I'm going to try. If there is another issue, I'll come back.


  • Options
    MichaelKnopfMichaelKnopf Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 31 RM Data Scientist
    edited June 2021

    The editable field the JSON snippet has no effect on the current operator you are working with. This is why changing the value from false to true did not seem to change anything. It does however affect new operators created from a saved configuration template (*.pyop file).

    I suggest you try the following:
    1. Start with the unmodified LightGBM tutorial process
    2. Save the operator configuration in the repository (using the Save button next to the Edit Python Script button)
    3. Change the editable field in the JSON snippet to true
    4. Save the modified operator configuration in the repository (under a different name)
    5. Drag both configuration files from the repository onto the canvas
    You should get two operators both named LightGBM: one with the configuration control disabled, and one with the configuration controls enabled.

    If necessary, you can also toggle the setting for operators that are already on the canvas. However, there is no UI for this. You will have to work with the XML panel. You can open the panel from the View menu. Clicking on an operator on the canvas will highlight the operator configuration in the XML panel. It should look as follows:
    <operator activated="true" class="python_scripting:python_learner" height="82" name="LightGBM" width="90" x="246" y="442">
            <parameter key="editable" value="false"/>
    Changing it to
    </code><code><operator activated="true" class="python_scripting:python_learner" height="82" name="LightGBM" width="90" x="246" y="442">
            <parameter key="editable" value="true"/>
    and then applying the changes by clicking on the button with the green check mark in the XML panel will update the operator. The operator should now show the configuration controls again.

Sign In or Register to comment.