Skip to content

Commit

Permalink
[RELEASE]: v0.9.9 (#1700)
Browse files Browse the repository at this point in the history
[RELEASE]: v0.9.9
  • Loading branch information
humzaiqbal authored Jul 29, 2022
1 parent 15d8ce9 commit 48506ba
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 270 deletions.
31 changes: 25 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


# Use the latest 2.1 version of CircleCI pipeline process engine.
version: 2.1

Expand Down Expand Up @@ -54,6 +56,7 @@ jobs:
TOXENV: coverage,doctest,type,check
TOX_INSTALL_DIR: .env
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python

steps:
- checkout
Expand All @@ -69,6 +72,7 @@ jobs:
TOXENV: coverage,doctest,type,check
TOX_INSTALL_DIR: .env
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python

steps:
- checkout
Expand Down Expand Up @@ -101,16 +105,29 @@ jobs:

steps:
- checkout
- run:
name: Setup python3
command: |
pyenv global 3.8.13 > /dev/null && activated=0 || activated=1
if [[ $activated -ne 0 ]]; then
for i in {1..6}; do
pyenv install 3.8.13 && break || sleep $((2 ** $i))
done
pyenv global 3.8.13
fi
- setup_dependencies
- run:
name: "Run Tox"
command: tox
no_output_timeout: 60m
command: |
export PYTHONUNBUFFERED=1
tox
Python37-Integration-Tests:
docker:
- image: cimg/python:3.7
environment:
TOXENV: complex,spark,type,check
TOXENV: complex,type,check
TOX_INSTALL_DIR: .env
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64

Expand All @@ -119,7 +136,10 @@ jobs:
- setup_dependencies
- run:
name: "Run Tox"
command: tox
no_output_timeout: 60m
command: |
export PYTHONUNBUFFERED=1
tox
Python36-Integration-Tests:
docker:
Expand All @@ -139,17 +159,16 @@ jobs:
workflows:
version: 2

Interation-Tests:
Integration-Tests:
jobs:
- Python38-Integration-Tests:
<<: *run_complex
- Python37-Integration-Tests:
<<: *run_complex
<<: *run_complex
- Python36-Integration-Tests:
<<: *run_complex
Unit-Tests:
jobs:
- Python37-Unit-Tests
- Python36-Unit-Tests
- Python38-Unit-Tests

20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.9.9]
## [0.9.10]
### [Breaking Changes]
### [Added]
### [Changed]
### [Deprecated]
### [Removed]

## [0.9.9] - 2022-04-14
### [Added]

* PR #1690: Bump numpy version for Mac M1 compat
* PR #1696: Fix linting
* PR #1694: Fix test loss
* PR #1693: Update black version to fix build
* PR #1671: Fix flaky test
* PR #1688: Fix branch filtering for complex tests
* PR #1686: Switch to CircleCI badge
* PR #1685: Migrating travis -> circle


### [Contributors]

Thanks to @rsmith49, @zexuan-zhou, @humzaiqbal, @fpoms, @crawlingcub, and @henryre for contributions!


## [0.9.8] - 2021-09-23
### [Added]

Expand Down
41 changes: 21 additions & 20 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,47 @@

# General scientific computing

numpy>=1.16.5,<=1.22.3
scipy>=1.2.0,<2.0.0
numpy>=1.16.5
scipy>=1.2.0

# Data storage and function application
pandas>=1.0.0,<2.0.0
tqdm>=4.33.0,<5.0.0
pandas>=1.0.0
tqdm>=4.33.0

# Internal models
scikit-learn>=0.20.2,<1.1
torch>=1.2.0,<2.0.0
scikit-learn>=0.20.2
torch>=1.2.0
munkres>=1.0.6

# LF dependency learning
networkx>=2.2,<2.7
networkx>=2.2

# Model introspection tools
tensorboard>=2.0.0,<2.7.0
tensorboard>=2.9.1

#### EXTRA/TEST LIBRARIES

# spaCy (NLP)
spacy>=2.1.0,<3.0.0
blis>=0.3.0,<=0.7.7
spacy>=2.1.0
blis>=0.3.0

# Dask (parallelism)
dask[dataframe]>=2020.12.0,<2022.04.1
distributed>=2020.12.0,<2022.04.1
dask[dataframe]>=2020.12.0
distributed>=2020.12.0

# Dill (serialization)
dill>=0.3.0,<0.4.0
dill>=0.3.0


#### DEV TOOLS

black>=22.3
flake8>=3.7.0,<4.0.0
isort>=4.3.0,<5.0.0
mypy==0.931
pydocstyle>=4.0.0,<5.0.0
flake8>=3.7.0
isort>=4.3.0
mypy==0.760
pydocstyle>=4.0.0
pytest>=5.0.0,<6.0.0
pytest-cov>=2.7.0,<3.0.0
pytest-doctestplus>=0.3.0,<0.4.0
tox>=3.13.0,<4.0.0
pytest-cov>=2.7.0
pytest-doctestplus>=0.3.0
tox>=3.13.0
protobuf==3.19.4
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
include_package_data=True,
install_requires=[
"munkres>=1.0.6",
"numpy>=1.16.5,<=1.22.3",
"scipy>=1.2.0,<2.0.0",
"pandas>=1.0.0,<2.0.0",
"tqdm>=4.33.0,<5.0.0",
"scikit-learn>=0.20.2,<1.1",
"torch>=1.2.0,<2.0.0",
"tensorboard>=2.0.0,<2.7.0",
"networkx>=2.2,<2.7",
"numpy>=1.16.5",
"scipy>=1.2.0",
"pandas>=1.0.0",
"tqdm>=4.33.0",
"scikit-learn>=0.20.2",
"torch>=1.2.0",
"tensorboard>=2.9.1",
"networkx>=2.2",
],
python_requires=">=3.6",
keywords="machine-learning ai weak-supervision",
Expand Down
6 changes: 3 additions & 3 deletions snorkel/labeling/model/label_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,14 +569,14 @@ def _set_class_balance(
3) Assume uniform class distribution
"""
if class_balance is not None:
self.p = np.array(class_balance)
self.p = np.array(class_balance) # type: ignore
if len(self.p) != self.cardinality:
raise ValueError(
f"class_balance has {len(self.p)} entries. Does not match LabelModel cardinality {self.cardinality}."
)
elif Y_dev is not None:
class_counts = Counter(Y_dev)
sorted_counts = np.array([v for k, v in sorted(class_counts.items())])
class_counts = Counter(Y_dev) # type: ignore
sorted_counts = np.array([v for k, v in sorted(class_counts.items())]) # type: ignore
self.p = sorted_counts / sum(sorted_counts)
if len(self.p) != self.cardinality:
raise ValueError(
Expand Down
2 changes: 1 addition & 1 deletion snorkel/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_MAJOR = "0"
_MINOR = "9"
_REVISION = "9+dev"
_REVISION = "9"

VERSION_SHORT = f"{_MAJOR}.{_MINOR}"
VERSION = f"{_MAJOR}.{_MINOR}.{_REVISION}"
2 changes: 1 addition & 1 deletion test/labeling/apply/test_lf_applier.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def f_bad(x: DataPoint) -> int:
L_EXPECTED_BAD = np.array([[-1, -1], [0, -1], [-1, -1], [-1, -1], [-1, -1]])
L_PREPROCESS_EXPECTED = np.array([[-1, -1], [0, 0], [-1, 0], [-1, 0], [-1, -1]])

TEXT_DATA = ["Jane", "Jane plays soccer.", "Jane plays soccer."]
TEXT_DATA = ["Jane.", "Jane plays soccer.", "Jane plays soccer."]
L_TEXT_EXPECTED = np.array([[0, -1], [0, 0], [0, 0]])


Expand Down
Loading

0 comments on commit 48506ba

Please sign in to comment.