Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
setup install dependencies (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda authored Feb 13, 2023
1 parent 84f0ad9 commit 9595936
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 120 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-10.15]
os: [ubuntu-22.04, macOS-11]
python-version: [3.8]

# Timeout: https://stackoverflow.com/a/59076067/4521646
Expand All @@ -28,20 +28,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
- name: Install package & dependencies
run: |
python --version
pip --version
pip install --requirement requirements.txt --upgrade --quiet --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install --requirement tests/requirements.txt --quiet
pip install -e . -U -q -r tests/requirements.txt -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip list
shell: bash

- name: Tests
run: |
coverage run --source hp_space_generator -m pytest hp_space_generator tests -v
run: coverage run --source hp_space_generator -m pytest hp_space_generator tests -v

- name: Statistics
if: success()
run: |
coverage report
run: coverage report
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div align="center">
<img src="https://pl-bolts-doc-images.s3.us-east-2.amazonaws.com/lai.png" width="200px">

[![Lightning](https://img.shields.io/badge/-Lightning-792ee5?logo=pytorchlightning&logoColor=white)](https://lightning.ai)
![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)
[![CI testing](https://github.com/Lightning-Universe/Hyper-Parameter-Space-Generator_component/actions/workflows/ci-testing.yml/badge.svg?event=push)](https://github.com/Lightning-Universe/Hyper-Parameter-Space-Generator_component/actions/workflows/ci-testing.yml)

A lightning component to generate Hyper Parameter Space on a given config for Random Search and Grid Search strategies.

______________________________________________________________________
Expand Down
94 changes: 0 additions & 94 deletions hp_space_generator/setup_tools.py

This file was deleted.

19 changes: 6 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,24 @@
import os
from importlib.util import module_from_spec, spec_from_file_location

from pkg_resources import parse_requirements
from setuptools import find_packages, setup

_PATH_ROOT = os.path.dirname(__file__)


def _load_py_module(fname, pkg="hp_space_generator"):
spec = spec_from_file_location(
os.path.join(pkg, fname), os.path.join(_PATH_ROOT, pkg, fname)
)
py = module_from_spec(spec)
spec.loader.exec_module(py)
return py
def _load_requirements(path_dir: str = _PATH_ROOT, file_name: str = "requirements.txt") -> list:
reqs = parse_requirements(open(os.path.join(path_dir, file_name)).readlines())
return list(map(str, reqs))


setup_tools = _load_py_module("setup_tools.py")

REQUIREMENTS = [req.strip() for req in open("requirements.txt").readlines()]

setup(
name="hp_space_generator",
version="0.0.1",
version="0.1.0",
description="Generator Hyper Parameter space around the given choices of hyper-parameters with Grid Search and Random Search strategies",
author="Kushashwa Ravi Shrimali, Ethan Harris",
author_email="[email protected]",
url="https://github.com/Lightning-AI/LAI-Hyper-Parameter-Space-Generator-Component",
packages=find_packages(exclude=["tests", "tests.*"]),
install_requires=setup_tools._load_requirements(_PATH_ROOT),
install_requires=_load_requirements(),
)
4 changes: 0 additions & 4 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ coverage
codecov>=2.1
pytest>=3.0.5
pytest-cov
pytest-flake8
flake8
check-manifest
twine==1.13.0
protobuf==3.20.1

0 comments on commit 9595936

Please sign in to comment.