Skip to content

Commit

Permalink
Initial file structure changes for Package (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuiP authored Jun 8, 2021
1 parent 993c080 commit 144091b
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 8 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#Jupyter notebook checkpoints
**/.ipynb_checkpoints/*

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.egg-info

# Python build artifacts
build/
dist/

#ignored examples files
examples/*.log

# Editors
.vscode/
.idea/

# Type checking
.mypy_cache

.coverage
Empty file added estimators/__init__.py
Empty file.
10 changes: 5 additions & 5 deletions basic-usage.py → estimators/basic-usage.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import argparse, os, gzip
import cressieread
import ips_snips
import mle
import ds_parse
import cats_utils
from contextual_bandits import cressieread
from contextual_bandits import ips_snips
from contextual_bandits import mle
from utils import ds_parse
from contextual_bandits import cats_utils


def compute_estimates(log_fp, cats_transformer=None):
Expand Down
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added estimators/slates/__init__.py
Empty file.
File renamed without changes.
Empty file added estimators/test/__init__.py
Empty file.
6 changes: 3 additions & 3 deletions test/test_pi.py → estimators/test/test_pi.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

import pseudo_inverse
import ips_snips
import cats_utils
from slates import pseudo_inverse
from contextual_bandits import ips_snips
from contextual_bandits import cats_utils

def test_single_slot_pi_equivalent_to_ips():
"""PI should be equivalent to IPS when there is only a single slot"""
Expand Down
Empty file added estimators/utils/__init__.py
Empty file.
File renamed without changes.
25 changes: 25 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import setuptools

with open("README.md", "r") as f:
long_description = f.read()

setuptools.setup(
name="vw-estimators",
version="0.0.1",
description="Python package of estimators to perform off-policy evaluation",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/VowpalWabbit/estimators.git",
license="BSD 3-Clause License",
classifiers=[
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3.6",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering"
],
packages=["estimators", "estimators.contextual_bandits", "estimators.slates", "estimators.utils"],
install_requires= ['scipy>=0.9'],
tests_require=['pytest'],
python_requires=">=3.6",
)

0 comments on commit 144091b

Please sign in to comment.