Skip to content

Commit

Permalink
Fix/other stacked notebooks (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
martins0n authored Dec 16, 2022
1 parent b8e45f8 commit 5ff32b2
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
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
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))

1 comment on commit 5ff32b2

@github-actions
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.