Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: require safe-ds-runner>=0.8.0,<0.9.0 #976

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Safely develop Data Science programs with a statically checked domain specific l
2. To _execute_ Safe-DS programs, the [Safe-DS Runner](https://github.com/Safe-DS/Runner) has to be installed and
configured additionally:
1. Install [Python](https://www.python.org/) (3.11 or 3.12).
2. Run `pip install "safe-ds-runner>=0.7.0,<0.8.0"` in a command line to download the latest matching Runner version
2. Run `pip install "safe-ds-runner>=0.8.0,<0.9.0"` in a command line to download the latest matching Runner version
from [PyPI](https://pypi.org/project/safe-ds-runner/).
3. If the Visual Studio Code extension cannot start the runner, adjust the setting `safe-ds.runner.command`.
Enter the absolute path to the Runner executable, as seen in the image below.
Expand Down
57 changes: 0 additions & 57 deletions docs/stdlib/safeds/data/tabular/typing/Schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,6 @@ Store column names and corresponding data types for a `Table` or `Row`.
@Pure
@PythonName("to_dict")
fun toDict() -> result1: Map<String, ColumnType>

/**
* Merge multiple schemas into one.
*
* For each type missmatch the new schema will have the least common supertype.
*
* The type hierarchy is as follows:
* * Anything
* * RealNumber
* * Integer
* * Boolean
* * String
*
* @param schemas the list of schemas you want to merge
*
* @result result1 the new merged schema
*/
@Pure
@PythonName("merge_multiple_schemas")
static fun mergeMultipleSchemas(
schemas: List<Schema>
) -> result1: Schema
}
```

Expand Down Expand Up @@ -145,38 +123,3 @@ Return a dictionary that maps column names to column types.
@PythonName("to_dict")
fun toDict() -> result1: Map<String, ColumnType>
```

## `#!sds static fun` mergeMultipleSchemas {#safeds.data.tabular.typing.Schema.mergeMultipleSchemas data-toc-label='mergeMultipleSchemas'}

Merge multiple schemas into one.

For each type missmatch the new schema will have the least common supertype.

The type hierarchy is as follows:
* Anything
* RealNumber
* Integer
* Boolean
* String

**Parameters:**

| Name | Type | Description | Default |
|------|------|-------------|---------|
| `schemas` | [`List<Schema>`][safeds.lang.List] | the list of schemas you want to merge | - |

**Results:**

| Name | Type | Description |
|------|------|-------------|
| `result1` | [`Schema`][safeds.data.tabular.typing.Schema] | the new merged schema |

??? quote "Source code in `schema.sdsstub`"

```sds linenums="67"
@Pure
@PythonName("merge_multiple_schemas")
static fun mergeMultipleSchemas(
schemas: List<Schema>
) -> result1: Schema
```
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Ada Boost classification.

??? quote "Source code in `ada_boost.sdsstub`"

```sds linenums="16"
```sds linenums="15"
class AdaBoostClassifier(
learner: Classifier = DecisionTreeClassifier(),
@PythonName("maximum_number_of_learners") const maximumNumberOfLearners: Int = 50,
Expand Down Expand Up @@ -90,7 +90,7 @@ This classifier is not modified.

??? quote "Source code in `ada_boost.sdsstub`"

```sds linenums="46"
```sds linenums="45"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Decision tree classification.

??? quote "Source code in `decision_tree.sdsstub`"

```sds linenums="10"
```sds linenums="9"
class DecisionTreeClassifier() sub Classifier {
/**
* Create a copy of this classifier and fit it with the given training data.
Expand Down Expand Up @@ -44,7 +44,7 @@ This classifier is not modified.

??? quote "Source code in `decision_tree.sdsstub`"

```sds linenums="20"
```sds linenums="19"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gradient boosting classification.

??? quote "Source code in `gradient_boosting.sdsstub`"

```sds linenums="15"
```sds linenums="14"
class GradientBoostingClassifier(
@PythonName("number_of_trees") const numberOfTrees: Int = 100,
@PythonName("learning_rate") const learningRate: Float = 0.1
Expand Down Expand Up @@ -78,7 +78,7 @@ This classifier is not modified.

??? quote "Source code in `gradient_boosting.sdsstub`"

```sds linenums="40"
```sds linenums="39"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ K-nearest-neighbors classification.

??? quote "Source code in `k_nearest_neighbors.sdsstub`"

```sds linenums="13"
```sds linenums="12"
class KNearestNeighborsClassifier(
@PythonName("number_of_neighbors") const numberOfNeighbors: Int
) sub Classifier where {
Expand Down Expand Up @@ -65,7 +65,7 @@ This classifier is not modified.

??? quote "Source code in `k_nearest_neighbors.sdsstub`"

```sds linenums="32"
```sds linenums="31"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Regularized logistic regression.

??? quote "Source code in `logistic_regression.sdsstub`"

```sds linenums="10"
```sds linenums="9"
class LogisticRegressionClassifier() sub Classifier {
/**
* Create a copy of this classifier and fit it with the given training data.
Expand Down Expand Up @@ -44,7 +44,7 @@ This classifier is not modified.

??? quote "Source code in `logistic_regression.sdsstub`"

```sds linenums="20"
```sds linenums="19"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Random forest classification.

??? quote "Source code in `random_forest.sdsstub`"

```sds linenums="12"
```sds linenums="11"
class RandomForestClassifier(
@PythonName("number_of_trees") const numberOfTrees: Int = 100
) sub Classifier where {
Expand Down Expand Up @@ -65,7 +65,7 @@ This classifier is not modified.

??? quote "Source code in `random_forest.sdsstub`"

```sds linenums="31"
```sds linenums="30"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Support vector machine.

??? quote "Source code in `support_vector_machine.sdsstub`"

```sds linenums="13"
```sds linenums="12"
class SupportVectorMachineClassifier(
const c: Float = 1.0,
kernel: SupportVectorMachineClassifier.Kernel = SupportVectorMachineClassifier.Kernel.RadialBasisFunction
Expand Down Expand Up @@ -104,7 +104,7 @@ This classifier is not modified.

??? quote "Source code in `support_vector_machine.sdsstub`"

```sds linenums="64"
```sds linenums="63"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand All @@ -117,7 +117,7 @@ The kernel functions that can be used in the support vector machine.

??? quote "Source code in `support_vector_machine.sdsstub`"

```sds linenums="22"
```sds linenums="21"
enum Kernel {
/**
* A linear kernel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Ada Boost regression.

??? quote "Source code in `ada_boost.sdsstub`"

```sds linenums="16"
```sds linenums="15"
class AdaBoostRegressor(
learner: Regressor = DecisionTreeRegressor(),
@PythonName("maximum_number_of_learners") const maximumNumberOfLearners: Int = 50,
Expand Down Expand Up @@ -90,7 +90,7 @@ This regressor is not modified.

??? quote "Source code in `ada_boost.sdsstub`"

```sds linenums="46"
```sds linenums="45"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Decision tree regression.

??? quote "Source code in `decision_tree.sdsstub`"

```sds linenums="10"
```sds linenums="9"
class DecisionTreeRegressor() sub Regressor {
/**
* Create a copy of this regressor and fit it with the given training data.
Expand Down Expand Up @@ -44,7 +44,7 @@ This regressor is not modified.

??? quote "Source code in `decision_tree.sdsstub`"

```sds linenums="20"
```sds linenums="19"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Elastic net regression.

??? quote "Source code in `elastic_net_regression.sdsstub`"

```sds linenums="14"
```sds linenums="13"
class ElasticNetRegressor(
const alpha: Float = 1.0,
@PythonName("lasso_ratio") const lassoRatio: Float = 0.5
Expand Down Expand Up @@ -79,7 +79,7 @@ This regressor is not modified.

??? quote "Source code in `elastic_net_regression.sdsstub`"

```sds linenums="40"
```sds linenums="39"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gradient boosting regression.

??? quote "Source code in `gradient_boosting.sdsstub`"

```sds linenums="15"
```sds linenums="14"
class GradientBoostingRegressor(
@PythonName("number_of_trees") const numberOfTrees: Int = 100,
@PythonName("learning_rate") const learningRate: Float = 0.1
Expand Down Expand Up @@ -78,7 +78,7 @@ This regressor is not modified.

??? quote "Source code in `gradient_boosting.sdsstub`"

```sds linenums="40"
```sds linenums="39"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ K-nearest-neighbors regression.

??? quote "Source code in `k_nearest_neighbors.sdsstub`"

```sds linenums="13"
```sds linenums="12"
class KNearestNeighborsRegressor(
@PythonName("number_of_neighbors") const numberOfNeighbors: Int
) sub Regressor where {
Expand Down Expand Up @@ -65,7 +65,7 @@ This regressor is not modified.

??? quote "Source code in `k_nearest_neighbors.sdsstub`"

```sds linenums="32"
```sds linenums="31"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Lasso regression.

??? quote "Source code in `lasso_regression.sdsstub`"

```sds linenums="12"
```sds linenums="11"
class LassoRegressor(
const alpha: Float = 1.0
) sub Regressor where {
Expand Down Expand Up @@ -65,7 +65,7 @@ This regressor is not modified.

??? quote "Source code in `lasso_regression.sdsstub`"

```sds linenums="31"
```sds linenums="30"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Linear regression.

??? quote "Source code in `linear_regression.sdsstub`"

```sds linenums="10"
```sds linenums="9"
class LinearRegressionRegressor() sub Regressor {
/**
* Create a copy of this regressor and fit it with the given training data.
Expand Down Expand Up @@ -44,7 +44,7 @@ This regressor is not modified.

??? quote "Source code in `linear_regression.sdsstub`"

```sds linenums="20"
```sds linenums="19"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Random forest regression.

??? quote "Source code in `random_forest.sdsstub`"

```sds linenums="12"
```sds linenums="11"
class RandomForestRegressor(
@PythonName("number_of_trees") const numberOfTrees: Int = 100
) sub Regressor where {
Expand Down Expand Up @@ -65,7 +65,7 @@ This regressor is not modified.

??? quote "Source code in `random_forest.sdsstub`"

```sds linenums="31"
```sds linenums="30"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Ridge regression.

??? quote "Source code in `ridge_regression.sdsstub`"

```sds linenums="12"
```sds linenums="11"
class RidgeRegressor(
const alpha: Float = 1.0
) sub Regressor where {
Expand Down Expand Up @@ -65,7 +65,7 @@ This regressor is not modified.

??? quote "Source code in `ridge_regression.sdsstub`"

```sds linenums="31"
```sds linenums="30"
@Pure
fun fit(
@PythonName("training_set") trainingSet: TaggedTable
Expand Down
Loading