Skip to content

Fix/other stacked notebooks #1034

Merged
merged 3 commits into from
Dec 16, 2022
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: 2 additions & 0 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
- name: Install dependencies
run: |
poetry install -E "all release jupyter" -vv
poetry run pip install tsfresh==0.19.0
poetry run pip install protobuf==3.20.1
- name: Notebook runner
run: |
poetry run python -m scripts.notebook_runner
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix release docs and docker images cron job ([#982](https://github.com/tinkoff-ai/etna/pull/982))
- Fix forecast first point with CatBoostPerSegmentModel ([#1010](https://github.com/tinkoff-ai/etna/pull/1010))
- Fix hanging EDA notebook ([#1027](https://github.com/tinkoff-ai/etna/pull/1027))
-
- Fix hanging EDA notebook v2 + cache clean script ([#1034](https://github.com/tinkoff-ai/etna/pull/1034))
-
## [1.13.0] - 2022-10-10
### Added
Expand Down
6 changes: 5 additions & 1 deletion examples/outliers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,11 @@
"cell_type": "code",
"execution_count": 13,
"id": "3ca5df18",
"metadata": {},
"metadata": {
"tags": [
"skip-execution"
]
},
"outputs": [
{
"data": {
Expand Down
32 changes: 32 additions & 0 deletions scripts/cache_cleaner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import json
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where it is planned to use this script?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of corrupted cache as it was today on master branch -- you can delete cache manually via this script

import subprocess
from datetime import datetime

from pydantic import BaseModel, parse_obj_as


class GithubCache(BaseModel):
id: int
ref: str
key: str
version: str
last_accessed_at: datetime
created_at: datetime
size_in_bytes: int


OWNER = "tinkoff-ai"
REPO = "etna"
COMMAND_GET_LIST = f'gh api -H "Accept: application/vnd.github+json" /repos/{OWNER}/{REPO}/actions/caches'
COMMAND_DELETE = (
lambda x: f'gh api --method DELETE -H "Accept: application/vnd.github+json" /repos/{OWNER}/{REPO}/actions/caches/{x}'
)

output = subprocess.check_output(COMMAND_GET_LIST, shell=True)

cache_list = parse_obj_as(list[GithubCache], json.loads(output)["actions_caches"])


print("Total caches:", len(cache_list))

list(map(lambda x: subprocess.check_output(COMMAND_DELETE(x.id), shell=True), cache_list))