Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Safe-DS/Library into perf-i…
Browse files Browse the repository at this point in the history
…mprove-tabular-dataset
  • Loading branch information
Marsmaennchen221 committed May 6, 2024
2 parents c2bfe4b + 102de2d commit 1c4de0e
Show file tree
Hide file tree
Showing 53 changed files with 2,191 additions and 1,087 deletions.
7 changes: 7 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ Get the latest version from [PyPI](https://pypi.org/project/safe-ds):
pip install safe-ds
```

On a Windows PC with an NVIDIA graphics card, you may also want to install the CUDA versions of `torch` and
`torchvision`:

```shell
pip install --upgrade torch torchvision --index-url https://download.pytorch.org/whl/cu121
```

## Documentation

You can find the full documentation [here](https://library.safeds.com).
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ jobs:
strategy:
fail-fast: false
matrix:
platform:
- "ubuntu-latest"
# - "macos-latest" # Intel Macs are no longer supported by Torch
- "windows-latest"
python-version:
- "3.11"
- "3.12"
uses: lars-reimann/.github/.github/workflows/poetry-codecov-reusable.yml@main
with:
working-directory: .
platform: ${{ matrix.platform }}
python-version: ${{ matrix.python-version }}
module-name: safeds
coverage: ${{ matrix.python-version == '3.11' }}
coverage: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ jobs:
strategy:
fail-fast: false
matrix:
platform:
- "ubuntu-latest"
# - "macos-latest" # Intel Macs are no longer supported by Torch
- "windows-latest"
python-version:
- "3.11"
- "3.12"
uses: lars-reimann/.github/.github/workflows/poetry-codecov-reusable.yml@main
with:
working-directory: .
platform: ${{ matrix.platform }}
python-version: ${{ matrix.python-version }}
module-name: safeds
coverage: ${{ matrix.python-version == '3.11' }}
coverage: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14 changes: 14 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [0.23.0](https://github.com/Safe-DS/Library/compare/v0.22.1...v0.23.0) (2024-05-04)


### Features

* add `Column.to_table` ([#705](https://github.com/Safe-DS/Library/issues/705)) ([36e4a7a](https://github.com/Safe-DS/Library/commit/36e4a7abc03bb826a4f55bf02575e45fd5412bf8)), closes [#695](https://github.com/Safe-DS/Library/issues/695)
* added Column.summarize_statistics() ([#715](https://github.com/Safe-DS/Library/issues/715)) ([71730a9](https://github.com/Safe-DS/Library/commit/71730a99a8af16b3e1e0e3c478250768785ca4d9)), closes [#701](https://github.com/Safe-DS/Library/issues/701)
* replace other values than NaN with imputer ([#707](https://github.com/Safe-DS/Library/issues/707)) ([4a059e0](https://github.com/Safe-DS/Library/commit/4a059e09a4c66397cf266f71c4248543e2e972e5)), closes [#643](https://github.com/Safe-DS/Library/issues/643)


### Bug Fixes

* use UTF-8 encoding when opening files ([#704](https://github.com/Safe-DS/Library/issues/704)) ([f8c27bc](https://github.com/Safe-DS/Library/commit/f8c27bcd5e1edb0243a1d785740b1883b477db4b))

## [0.22.1](https://github.com/Safe-DS/Library/compare/v0.22.0...v0.22.1) (2024-05-02)


Expand Down
7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ Get the latest version from [PyPI](https://pypi.org/project/safe-ds):
pip install safe-ds
```

On a Windows PC with an NVIDIA graphics card, you may also want to install the CUDA versions of `torch` and
`torchvision`:

```shell
pip install --upgrade torch torchvision --index-url https://download.pytorch.org/whl/cu121
```

## Contributing

We welcome contributions from everyone. As a starting point, check the following resources:
Expand Down
72 changes: 36 additions & 36 deletions docs/tutorials/data_processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from safeds.data.tabular.containers import Table\n",
"\n",
"titanic = Table.from_csv_file(\"data/titanic.csv\")"
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -54,15 +54,15 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic_slice = titanic.slice_rows(end=10)\n",
"\n",
"titanic_slice # just to show the output"
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -76,13 +76,13 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic_slice.get_row(0)"
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -96,13 +96,13 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic_slice.get_column(\"name\")"
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -116,7 +116,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"Table.from_rows([\n",
" titanic_slice.get_row(0),\n",
Expand All @@ -125,7 +124,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -139,7 +139,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"Table.from_columns([\n",
" titanic_slice.get_column(\"name\"),\n",
Expand All @@ -148,7 +147,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -162,7 +162,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic_slice.remove_columns([\n",
" \"id\",\n",
Expand All @@ -175,7 +174,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -189,13 +189,13 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic_slice.keep_only_columns([\"name\", \"survived\"])"
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -211,13 +211,13 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic_slice.sort_columns()"
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -231,7 +231,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic_slice.sort_columns(\n",
" lambda column1, column2:\n",
Expand All @@ -240,7 +239,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -254,7 +254,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic.filter_rows(\n",
" lambda row:\n",
Expand All @@ -263,7 +262,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -278,7 +278,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from safeds.data.tabular.transformation import Imputer\n",
"\n",
Expand All @@ -287,7 +286,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -301,7 +301,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from safeds.data.tabular.transformation import LabelEncoder\n",
"\n",
Expand All @@ -310,7 +309,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -324,7 +324,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from safeds.data.tabular.transformation import OneHotEncoder\n",
"\n",
Expand All @@ -333,7 +332,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -347,7 +347,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from safeds.data.tabular.transformation import RangeScaler\n",
"\n",
Expand All @@ -356,7 +355,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -370,7 +370,6 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from safeds.data.tabular.transformation import StandardScaler\n",
"\n",
Expand All @@ -379,7 +378,8 @@
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -394,13 +394,13 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic_slice.transform_column(\"sex\", lambda row: 1 if row.get_value(\"sex\") == \"female\" else 0)\n"
],
"metadata": {
"collapsed": false
}
},
"outputs": []
},
{
"cell_type": "markdown",
Expand All @@ -414,13 +414,13 @@
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"titanic_slice.transform_column(\"parents_children\", lambda row: \"No\" if row.get_value(\"parents_children\") == 0 else \"Yes\")\n"
],
"metadata": {
"collapsed": false
}
},
"outputs": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 1c4de0e

Please sign in to comment.