dl-backtrace 0.1.dev8__tar.gz → 0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dl-backtrace might be problematic. Click here for more details.
- dl_backtrace-0.2/.github/scripts/release.py +50 -0
- dl_backtrace-0.2/.github/workflows/publish.yml +90 -0
- dl_backtrace-0.2/.github/workflows/release.yml +18 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/MANIFEST.in +1 -1
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/PKG-INFO +2 -2
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/backtrace/backtrace.py +3 -3
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/backtrace/config.py +1 -1
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/backtrace/backtrace.py +3 -3
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/backtrace/config.py +1 -1
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/version.py +2 -2
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace.egg-info/PKG-INFO +2 -2
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace.egg-info/SOURCES.txt +3 -1
- dl_backtrace-0.2/dl_backtrace.egg-info/requires.txt +1 -0
- dl_backtrace-0.2/requirements.txt +1 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/setup.py +1 -2
- dl_backtrace-0.1.dev8/dl_backtrace.egg-info/requires.txt +0 -1
- dl_backtrace-0.1.dev8/requirements.txt +0 -1
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/.gitignore +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/LICENSE +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/__init__.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/__init__.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/backtrace/__init__.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/backtrace/utils/__init__.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/backtrace/utils/contrast.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/backtrace/utils/prop.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/__init__.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/backtrace/__init__.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/backtrace/utils/__init__.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/backtrace/utils/contrast.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/backtrace/utils/prop.py +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace.egg-info/dependency_links.txt +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace.egg-info/top_level.txt +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/pyproject.toml +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/readme.md +0 -0
- {dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/setup.cfg +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import subprocess
|
|
3
|
+
|
|
4
|
+
default_version = "0.0.1"
|
|
5
|
+
|
|
6
|
+
def get_last_version() -> str:
|
|
7
|
+
"""Return the version number of the last release."""
|
|
8
|
+
tag_info = (
|
|
9
|
+
subprocess.run(
|
|
10
|
+
"gh release list | grep -E -v '^.+\\.dev\\d*' | head -n 1",
|
|
11
|
+
shell=True,
|
|
12
|
+
check=True,
|
|
13
|
+
stdout=subprocess.PIPE,
|
|
14
|
+
stderr=subprocess.PIPE
|
|
15
|
+
)
|
|
16
|
+
.stdout.decode("utf8")
|
|
17
|
+
.strip()
|
|
18
|
+
)
|
|
19
|
+
tag_fields = tag_info.split('\t')
|
|
20
|
+
tag = tag_fields[2] if len(tag_fields) > 2 else default_version
|
|
21
|
+
|
|
22
|
+
return tag
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def bump_patch_number(version_number: str) -> str:
|
|
26
|
+
"""Return a copy of `version_number` with the patch number incremented."""
|
|
27
|
+
major, minor, patch = version_number.split(".")
|
|
28
|
+
return f"{major}.{minor}.{int(patch) + 1}"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def create_new_patch_release():
|
|
32
|
+
"""Create a new patch release on GitHub."""
|
|
33
|
+
try:
|
|
34
|
+
last_version_number = get_last_version()
|
|
35
|
+
except subprocess.CalledProcessError as err:
|
|
36
|
+
# The project doesn't have any releases yet.
|
|
37
|
+
new_version_number = default_version
|
|
38
|
+
print(err)
|
|
39
|
+
print(f'taking default version: {new_version_number}')
|
|
40
|
+
else:
|
|
41
|
+
new_version_number = bump_patch_number(last_version_number)
|
|
42
|
+
|
|
43
|
+
subprocess.run(
|
|
44
|
+
["gh", "release", "create", "--generate-notes", new_version_number],
|
|
45
|
+
check=True,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
if __name__ == "__main__":
|
|
50
|
+
create_new_patch_release()
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- '*.*.*'
|
|
8
|
+
- '!*.*.dev*'
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
pypi:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Fetch tags
|
|
20
|
+
run: git fetch --prune --tags
|
|
21
|
+
|
|
22
|
+
- name: Get Release Notes
|
|
23
|
+
id: release_notes
|
|
24
|
+
run: |
|
|
25
|
+
TAG_NAME=$(gh release view --json tagName | jq -r .tagName)
|
|
26
|
+
RELEASE_NOTES=$(gh release view --json url | jq -r .url)
|
|
27
|
+
RELEASE_NOTES="${RELEASE_NOTES//$'\n'/\\n}"
|
|
28
|
+
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_OUTPUT
|
|
29
|
+
echo "RELEASE_NOTES=${RELEASE_NOTES}" >> $GITHUB_OUTPUT
|
|
30
|
+
env:
|
|
31
|
+
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
|
32
|
+
|
|
33
|
+
- name: Install dependencies and run tests
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
pip install -r requirements.txt
|
|
37
|
+
pip install .
|
|
38
|
+
pip install pytest
|
|
39
|
+
pytest tests/
|
|
40
|
+
continue-on-error: false
|
|
41
|
+
|
|
42
|
+
- name: Build package
|
|
43
|
+
run: python3 -m pip install --upgrade build && python3 -m build
|
|
44
|
+
|
|
45
|
+
- name: Publish package to PyPI
|
|
46
|
+
if: success()
|
|
47
|
+
run: |
|
|
48
|
+
python -m pip install --upgrade twine
|
|
49
|
+
python -m twine upload dist/*
|
|
50
|
+
env:
|
|
51
|
+
TWINE_USERNAME: __token__
|
|
52
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
53
|
+
|
|
54
|
+
- name: Send release notes to Slack
|
|
55
|
+
id: slack
|
|
56
|
+
uses: slackapi/slack-github-action@v1.24.0
|
|
57
|
+
with:
|
|
58
|
+
# Slack channel id, channel name, or user id to post message.
|
|
59
|
+
# See also: https://api.slack.com/methods/chat.postMessage#channels
|
|
60
|
+
# You can pass in multiple channels to post to by providing a comma-delimited list of channel IDs.
|
|
61
|
+
channel-id: 'aryaxai-dl-backtrace-release'
|
|
62
|
+
payload: |
|
|
63
|
+
{
|
|
64
|
+
"text": "AryaXAI SDK release",
|
|
65
|
+
"blocks": [
|
|
66
|
+
{
|
|
67
|
+
"type": "section",
|
|
68
|
+
"text": {
|
|
69
|
+
"type": "mrkdwn",
|
|
70
|
+
"text": "*Version:* ${{ steps.release_notes.outputs.TAG_NAME }}"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "section",
|
|
75
|
+
"text": {
|
|
76
|
+
"type": "mrkdwn",
|
|
77
|
+
"text": "*Release Notes:* ${{ steps.release_notes.outputs.RELEASE_NOTES }}"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "section",
|
|
82
|
+
"text": {
|
|
83
|
+
"type": "mrkdwn",
|
|
84
|
+
"text": "*PyPI URL:* https://pypi.org/project/aryaxai/${{ steps.release_notes.outputs.TAG_NAME }}"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
env:
|
|
90
|
+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Create release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
github:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout
|
|
14
|
+
uses: actions/checkout@v3
|
|
15
|
+
- name: Create new release
|
|
16
|
+
run: .github/scripts/release.py
|
|
17
|
+
env:
|
|
18
|
+
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dl_backtrace
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2
|
|
4
4
|
Summary: Add description here...
|
|
5
5
|
Home-page: https://xai.arya.ai/docs/introduction
|
|
6
6
|
License: MIT
|
|
@@ -13,7 +13,7 @@ Classifier: Operating System :: OS Independent
|
|
|
13
13
|
Requires-Python: >=3.0
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
|
-
Requires-Dist: tensorflow==2.
|
|
16
|
+
Requires-Dist: tensorflow==2.14.0
|
|
17
17
|
|
|
18
18
|
# AryaXai-Backtrace
|
|
19
19
|
Backtrace module for Generating Explainability on Deep learning models
|
{dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/backtrace/backtrace.py
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
import torch
|
|
3
3
|
import torch.nn as nn
|
|
4
|
-
from utils import contrast as UC
|
|
5
|
-
from utils import prop as UP
|
|
6
|
-
from config import activation_master
|
|
4
|
+
from dl_backtrace.pytorch_backtrace.backtrace.utils import contrast as UC
|
|
5
|
+
from dl_backtrace.pytorch_backtrace.backtrace.utils import prop as UP
|
|
6
|
+
from dl_backtrace.pytorch_backtrace.backtrace.config import activation_master
|
|
7
7
|
|
|
8
8
|
class Backtrace(object):
|
|
9
9
|
"""
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
from tensorflow.keras import Model
|
|
3
3
|
|
|
4
|
-
from config import activation_master
|
|
5
|
-
from utils import contrast as UC
|
|
6
|
-
from utils import prop as UP
|
|
4
|
+
from dl_backtrace.tf_backtrace.backtrace.config import activation_master
|
|
5
|
+
from dl_backtrace.tf_backtrace.backtrace.utils import contrast as UC
|
|
6
|
+
from dl_backtrace.tf_backtrace.backtrace.utils import prop as UP
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class Backtrace(object):
|
|
@@ -12,5 +12,5 @@ __version__: str
|
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
|
13
13
|
version_tuple: VERSION_TUPLE
|
|
14
14
|
|
|
15
|
-
__version__ = version = '0.
|
|
16
|
-
__version_tuple__ = version_tuple = (0,
|
|
15
|
+
__version__ = version = '0.0.2.dev3'
|
|
16
|
+
__version_tuple__ = version_tuple = (0, 0, 2, 'dev3')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dl-backtrace
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2
|
|
4
4
|
Summary: Add description here...
|
|
5
5
|
Home-page: https://xai.arya.ai/docs/introduction
|
|
6
6
|
License: MIT
|
|
@@ -13,7 +13,7 @@ Classifier: Operating System :: OS Independent
|
|
|
13
13
|
Requires-Python: >=3.0
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
|
-
Requires-Dist: tensorflow==2.
|
|
16
|
+
Requires-Dist: tensorflow==2.14.0
|
|
17
17
|
|
|
18
18
|
# AryaXai-Backtrace
|
|
19
19
|
Backtrace module for Generating Explainability on Deep learning models
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
.gitignore
|
|
2
2
|
LICENSE
|
|
3
3
|
MANIFEST.in
|
|
4
|
-
README.md
|
|
5
4
|
pyproject.toml
|
|
6
5
|
readme.md
|
|
7
6
|
requirements.txt
|
|
8
7
|
setup.py
|
|
8
|
+
.github/scripts/release.py
|
|
9
|
+
.github/workflows/publish.yml
|
|
10
|
+
.github/workflows/release.yml
|
|
9
11
|
dl_backtrace/__init__.py
|
|
10
12
|
dl_backtrace/version.py
|
|
11
13
|
dl_backtrace.egg-info/PKG-INFO
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tensorflow==2.14.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tensorflow==2.14.0
|
|
@@ -8,8 +8,7 @@ with open('requirements.txt', 'r', encoding='utf-8') as pr:
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='dl_backtrace',
|
|
11
|
-
|
|
12
|
-
setup_requires=['setuptools_scm'],
|
|
11
|
+
version="0.2",
|
|
13
12
|
description='Add description here...',
|
|
14
13
|
long_description=long_description,
|
|
15
14
|
long_description_content_type='text/markdown',
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tensorflow==2.15.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tensorflow==2.15.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/backtrace/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/pytorch_backtrace/backtrace/utils/prop.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/backtrace/utils/__init__.py
RENAMED
|
File without changes
|
{dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/backtrace/utils/contrast.py
RENAMED
|
File without changes
|
{dl_backtrace-0.1.dev8 → dl_backtrace-0.2}/dl_backtrace/tf_backtrace/backtrace/utils/prop.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|