Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 .github/workflows/build-and-publish-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
build:
if: (startsWith(github.head_ref, 'release-') && github.event.pull_request.merged == true)
name: Build Skyline
name: Build DeepView.Profile
runs-on: ubuntu-latest

steps:
Expand Down
32 changes: 9 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![Skyline](https://raw.githubusercontent.com/skylineprof/skyline/master/assets/skyline-wordmark.png)
[![License](https://img.shields.io/badge/license-Apache--2.0-green?style=flat)](https://github.com/CentML/skyline/blob/main/LICENSE)
![](https://img.shields.io/pypi/pyversions/skyline-profiler.svg)
[![](https://img.shields.io/pypi/v/skyline-profiler.svg)](https://pypi.org/project/skyline-profiler/)
![DeepView](https://raw.githubusercontent.com/CentML/DeepView.Profile/main/assets/deepview.png)
[![License](https://img.shields.io/badge/license-Apache--2.0-green?style=flat)](https://github.com/CentML/DeepView.Profile/blob/main/LICENSE)
![](https://img.shields.io/pypi/pyversions/deepview-profile.svg)
[![](https://img.shields.io/pypi/v/deepview-profile.svg)](https://pypi.org/project/deepview-profile/)

DeepView.Profile is a tool to profile and debug the training performance of [PyTorch](https://pytorch.org) neural networks.

Expand Down Expand Up @@ -40,24 +40,10 @@ poetry run deepview --help

### Installation from PyPi

**Note:** Not implemented yet

Installing with [Poetry](https://python-poetry.org/)
```zsh
poetry add deepview-profiler
poetry run deepview --help
```

Installing with [Pipenv](https://pipenv.pypa.io/en/latest/)
```zsh
pipenv install deepview-profiler
pipenv run deepview --help
```

Installing with [Pip](https://packaging.python.org/en/latest/tutorials/installing-packages/#use-pip-for-installing)
```zsh
python3 -m pip install deepview-profiler
python3 skyline
python3 -m deepview -h
```

<h2 id="getting-started">Usage example</h2>
Expand All @@ -80,14 +66,14 @@ file where you want DeepView.Profile to save the run time profiling report using
`--output` or `-o` flag.

```zsh
poetry run deepview time entry_point.py --output my_output_file.sqlite
python3 -m deepview time entry_point.py --output my_output_file.sqlite
```

Launching memory profiling is almost the same as launching run time profiling.
You just need to use `deepview memory` instead of `deepview time`.

```zsh
poetry run deepview memory entry_point.py --output my_output_file.sqlite
python3 -m deepview memory entry_point.py --output my_output_file.sqlite
```

<h2 id="dev-setup">Development Environment Setup</h2>
Expand All @@ -106,12 +92,12 @@ poetry install
1. After the PR is merged [build-and-publish-new-version.yml](.github/workflows/build-and-publish-new-version.yml) GitHub action will:
* build the Python Wheels
* GitHub release
* Try to publish to Test PyPI
* Publish to Test PyPI
* Subject to approval publish to PyPI

<h2 id="release-history">Release History</h2>

See [Releases](https://github.com/UofT-EcoSystem/skyline/releases)
See [Releases](https://github.com/CentML/DeepView.Profile/releases)

<h2 id="meta">Meta</h2>

Expand Down
Binary file added assets/deepview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/skyline-wordmark.png
Binary file not shown.
File renamed without changes.
20 changes: 10 additions & 10 deletions skyline/__main__.py → deepview_profile/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
import enum
import sys

import skyline
import skyline.commands.interactive
import skyline.commands.memory
import skyline.commands.time
import deepview_profile
import deepview_profile.commands.interactive
import deepview_profile.commands.memory
import deepview_profile.commands.time


def main():
parser = argparse.ArgumentParser(
prog="skyline",
description="Skyline: Interactive Neural Network Performance "
prog="DeepView",
description="DeepView: Interactive Neural Network Performance "
"Profiler, Visualizer, and Debugger for PyTorch",
)
parser.add_argument(
Expand All @@ -20,13 +20,13 @@ def main():
help="Print the version and exit.",
)
subparsers = parser.add_subparsers(title="Commands")
skyline.commands.interactive.register_command(subparsers)
skyline.commands.memory.register_command(subparsers)
skyline.commands.time.register_command(subparsers)
deepview_profile.commands.interactive.register_command(subparsers)
deepview_profile.commands.memory.register_command(subparsers)
deepview_profile.commands.time.register_command(subparsers)
args = parser.parse_args()

if args.version:
print('Skyline Command Line Interface', 'v' + skyline.__version__)
print('DeepView Command Line Interface', 'v' + deepview_profile.__version__)
return

if 'func' not in args:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import time
from concurrent.futures import ThreadPoolExecutor

from skyline.analysis.runner import analyze_project
from skyline.config import Config
from skyline.exceptions import AnalysisError
from skyline.nvml import NVML
import skyline.protocol_gen.innpv_pb2 as pm
from deepview_profile.analysis.runner import analyze_project
from deepview_profile.config import Config
from deepview_profile.exceptions import AnalysisError
from deepview_profile.nvml import NVML
import deepview_profile.protocol_gen.innpv_pb2 as pm

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -142,7 +142,7 @@ def _handle_analysis_request(self, analysis_request, context):
self._send_analysis_error,
AnalysisError(
'An unexpected error occurred when analyzing your model. '
'Please file a bug report and then restart Deepview.'
'Please file a bug report and then restart DeepView.'
),
context,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import os

import torch
from skyline.analysis.session import AnalysisSession
from skyline.nvml import NVML
from deepview_profile.analysis.session import AnalysisSession
from deepview_profile.nvml import NVML


def analyze_project(project_root, entry_point, nvml):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
import torch
import numpy as np

import skyline.protocol_gen.innpv_pb2 as pm
from skyline.analysis.static import StaticAnalyzer
from skyline.db.database import DatabaseInterface, EnergyTableInterface
from skyline.energy.measurer import EnergyMeasurer
from skyline.exceptions import AnalysisError, exceptions_as_analysis_errors
from skyline.profiler.iteration import IterationProfiler
from skyline.tracking.tracker import Tracker
from skyline.user_code_utils import user_code_environment
import deepview_profile.protocol_gen.innpv_pb2 as pm
from deepview_profile.analysis.static import StaticAnalyzer
from deepview_profile.db.database import DatabaseInterface, EnergyTableInterface
from deepview_profile.energy.measurer import EnergyMeasurer
from deepview_profile.exceptions import AnalysisError, exceptions_as_analysis_errors
from deepview_profile.profiler.iteration import IterationProfiler
from deepview_profile.tracking.tracker import Tracker
from deepview_profile.user_code_utils import user_code_environment

from typing import List

Expand All @@ -31,7 +31,7 @@

habitat_found = True
except ImportError:
logger.debug("Deepview.Predict not found, GPU predictions not available")
logger.debug("DeepView.Predict not found, GPU predictions not available")
habitat_found = False


Expand Down Expand Up @@ -244,7 +244,7 @@ def habitat_predict(self):
source_device = device
pynvml.nvmlShutdown()
if not source_device:
logger.debug("Skipping Deepview predictions, source not in list of supported GPUs.")
logger.debug("Skipping DeepView predictions, source not in list of supported GPUs.")
src = pm.HabitatDevicePrediction()
src.device_name = 'unavailable'
src.runtime_ms = -1
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import subprocess
import threading

from skyline.initialization import (
from deepview_profile.initialization import (
check_skyline_preconditions,
initialize_skyline,
)
Expand All @@ -14,7 +14,7 @@
def register_command(subparsers):
parser = subparsers.add_parser(
"interactive",
help="Start a new Deepview interactive profiling session.",
help="Start a new DeepView interactive profiling session.",
)
parser.add_argument(
"--host",
Expand Down Expand Up @@ -48,8 +48,8 @@ def register_command(subparsers):
parser.set_defaults(func=main)

def actual_main(args):
from skyline.config import Config
from skyline.server import SkylineServer
from deepview_profile.config import Config
from deepview_profile.server import SkylineServer

should_shutdown = threading.Event()

Expand All @@ -63,7 +63,7 @@ def signal_handler(signal, frame):
with SkylineServer(args.host, args.port) as server:
_, port = server.listening_on
logger.info(
"Deepview interactive profiling session started! "
"DeepView interactive profiling session started! "
"Listening on port %d.",
port,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import sys
import csv

from skyline.initialization import (
from deepview_profile.initialization import (
check_skyline_preconditions,
initialize_skyline,
)
from skyline.error_printing import print_analysis_error
from deepview_profile.error_printing import print_analysis_error

logger = logging.getLogger(__name__)

Expand All @@ -19,7 +19,7 @@ def register_command(subparsers):
)
parser.add_argument(
"entry_point",
help="The entry point file in this project that contains the Deepview "
help="The entry point file in this project that contains the DeepView "
"provider functions.",
)
parser.add_argument(
Expand Down Expand Up @@ -59,9 +59,9 @@ def make_measurements(session, batch_size):


def actual_main(args):
from skyline.analysis.session import AnalysisSession
from skyline.config import Config
from skyline.exceptions import AnalysisError
from deepview_profile.analysis.session import AnalysisSession
from deepview_profile.config import Config
from deepview_profile.exceptions import AnalysisError

if os.path.exists(args.output):
print(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import os
import sys

from skyline.initialization import (
from deepview_profile.initialization import (
check_skyline_preconditions,
initialize_skyline,
)
from skyline.error_printing import print_analysis_error
from deepview_profile.error_printing import print_analysis_error

logger = logging.getLogger(__name__)

Expand All @@ -18,7 +18,7 @@ def register_command(subparsers):
)
parser.add_argument(
"entry_point",
help="The entry point file in this project that contains the Skyline "
help="The entry point file in this project that contains the DeepView "
"provider functions.",
)
parser.add_argument(
Expand All @@ -36,9 +36,9 @@ def register_command(subparsers):


def actual_main(args):
from skyline.analysis.session import AnalysisSession
from skyline.config import Config
from skyline.exceptions import AnalysisError
from deepview_profile.analysis.session import AnalysisSession
from deepview_profile.config import Config
from deepview_profile.exceptions import AnalysisError

if os.path.exists(args.output):
print(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
import sys
import csv

from skyline.initialization import (
from deepview_profile.initialization import (
check_skyline_preconditions,
initialize_skyline,
)
from skyline.error_printing import print_analysis_error
from deepview_profile.error_printing import print_analysis_error

logger = logging.getLogger(__name__)


def register_command(subparsers):
parser = subparsers.add_parser(
"prediction-models",
help="Evaluate Deepview's prediction accuracy.",
help="Evaluate DeepView's prediction accuracy.",
)
parser.add_argument(
"entry_point",
help="The entry point file in this project that contains the Deepview "
help="The entry point file in this project that contains the DeepView "
"provider functions.",
)
parser.add_argument(
Expand Down Expand Up @@ -54,9 +54,9 @@ def get_model(session, batch_size):


def actual_main(args):
from skyline.analysis.session import AnalysisSession
from skyline.config import Config
from skyline.exceptions import AnalysisError
from deepview_profile.analysis.session import AnalysisSession
from deepview_profile.config import Config
from deepview_profile.exceptions import AnalysisError

if os.path.exists(args.output):
print(
Expand Down
12 changes: 6 additions & 6 deletions skyline/commands/time.py → deepview_profile/commands/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import os
import sys

from skyline.initialization import (
from deepview_profile.initialization import (
check_skyline_preconditions,
initialize_skyline,
)
from skyline.error_printing import print_analysis_error
from deepview_profile.error_printing import print_analysis_error

logger = logging.getLogger(__name__)

Expand All @@ -18,7 +18,7 @@ def register_command(subparsers):
)
parser.add_argument(
"entry_point",
help="The entry point file in this project that contains the Deepview "
help="The entry point file in this project that contains the DeepView "
"provider functions.",
)
parser.add_argument(
Expand All @@ -37,9 +37,9 @@ def register_command(subparsers):


def actual_main(args):
from skyline.analysis.session import AnalysisSession
from skyline.config import Config
from skyline.exceptions import AnalysisError
from deepview_profile.analysis.session import AnalysisSession
from deepview_profile.config import Config
from deepview_profile.exceptions import AnalysisError

if os.path.exists(args.output):
print(
Expand Down
Loading