Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial file structure changes for Package #16

Merged
merged 7 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
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",
)