Skip to content

Commit b3bc699

Browse files
committed
make release-tag: Merge branch 'master' into stable
2 parents 9405765 + bedd66e commit b3bc699

12 files changed

Lines changed: 169 additions & 108 deletions

File tree

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Report an error that you found when using CTGAN
4+
title: ''
5+
labels: bug, pending review
6+
assignees: ''
7+
8+
---
9+
10+
### Environment Details
11+
12+
Please indicate the following details about the environment in which you found the bug:
13+
14+
* CTGAN version:
15+
* Python version:
16+
* Operating System:
17+
18+
### Error Description
19+
20+
<!--Replace this text with a description of what you were trying to get done.
21+
Tell us what happened, what went wrong, and what you expected to happen.-->
22+
23+
### Steps to reproduce
24+
25+
<!--Replace this text with a description of the steps that anyone can follow to
26+
reproduce the error. If the error happens only on a specific dataset, please
27+
consider attaching some example data to the issue so that others can use it
28+
to reproduce the error.-->
29+
30+
```
31+
Paste the command(s) you ran and the output.
32+
If there was a crash, please include the traceback here.
33+
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request
3+
about: Request a new feature that you would like to see implemented in CTGAN
4+
title: ''
5+
labels: new feature, pending review
6+
assignees: ''
7+
8+
---
9+
10+
### Problem Description
11+
12+
<!--Replace this with a description of the problem that you think CTGAN should be able
13+
to solve and is not solving already-->
14+
15+
### Expected behavior
16+
17+
<!--Replace this a clear and concise description of what you would expect CTGAN with regards
18+
with the described problem. If possible, explain how you would like to interact with CTGAN
19+
and what the outcome of this interaction would be.-->
20+
21+
### Additional context
22+
23+
<!--Please provide any additional context that may be relevant to the issue here. If none,
24+
please remove this section.-->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Question
3+
about: Doubts about CTGAN usage
4+
title: ''
5+
labels: question, pending review
6+
assignees: ''
7+
8+
---
9+
10+
### Environment details
11+
12+
If you are already running CTGAN, please indicate the following details about the environment in
13+
which you are running it:
14+
15+
* CTGAN version:
16+
* Python version:
17+
* Operating System:
18+
19+
### Problem description
20+
21+
<!--Replace this with a description of the problem that you are trying to solve using CTGAN. If
22+
possible, describe the data that you are using, or consider attaching some example data
23+
that others can use to propose a working solution for your problem.-->
24+
25+
### What I already tried
26+
27+
<!--Replace with a description of what you already tried and what is the behavior that you observe.
28+
If possible, also add below the exact code that you are running.-->
29+
30+
```
31+
Paste the command(s) you ran and the output.
32+
If there was a crash, please include the traceback here.
33+
```

HISTORY.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# History
22

3+
## v0.4.0 - 2021-02-24
4+
5+
Maintenance relese to upgrade dependencies to ensure compatibility with the rest
6+
of the SDV libraries.
7+
8+
Also add a validation on the CTGAN `condition_column` and `condition_value` inputs.
9+
10+
### Improvements
11+
12+
* Validate condition_column and condition_value - Issue [#124](https://github.com/sdv-dev/CTGAN/issues/124) by @fealho
13+
314
## v0.3.1 - 2021-01-27
415

516
### Improvements

conda/meta.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = 'ctgan' %}
2-
{% set version = '0.3.1' %}
2+
{% set version = '0.4.0.dev2' %}
33

44
package:
55
name: "{{ name|lower }}"
@@ -17,35 +17,35 @@ build:
1717

1818
requirements:
1919
host:
20-
- numpy <2,>=1.17.4
21-
- pandas <1.1.5,>=0.24
2220
- pip
23-
- python
24-
- rdt >=0.2.7,<0.3
25-
- scikit-learn <0.24,>=0.21
26-
- pytorch <2,>=1.0
27-
- torchvision <1,>=0.4.2
28-
- packaging
2921
- pytest-runner
22+
- packaging
23+
- python >=3.6,<3.9
24+
- numpy >=1.18.0,<2
25+
- pandas >=1.1,<1.1.5
26+
- scikit-learn >=0.23,<1
27+
- pytorch >=1.4,<2
28+
- torchvision >=0.5.0,<1
29+
- rdt >=0.4.0,<0.5
3030
run:
31-
- numpy <2,>=1.17.4
32-
- pandas <1.1.5,>=0.24
33-
- python
34-
- rdt >=0.2.7,<0.3
35-
- scikit-learn <0.24,>=0.21
36-
- pytorch <2,>=1.0
37-
- torchvision <1,>=0.4.2
3831
- packaging
32+
- python >=3.6,<3.9
33+
- numpy >=1.18.0,<2
34+
- pandas >=1.1,<1.1.5
35+
- scikit-learn >=0.23,<1
36+
- pytorch >=1.4,<2
37+
- torchvision >=0.5.0,<1
38+
- rdt >=0.4.0,<0.5
3939

4040
about:
4141
home: "https://github.com/sdv-dev/CTGAN"
4242
license: MIT
4343
license_family: MIT
44-
license_file:
44+
license_file:
4545
summary: "Conditional GAN for Tabular Data"
46-
doc_url:
47-
dev_url:
46+
doc_url:
47+
dev_url:
4848

4949
extra:
5050
recipe-maintainers:
51-
- sdv-dev
51+
- sdv-dev

ctgan/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
__author__ = 'MIT Data To AI Lab'
66
__email__ = 'dailabmit@gmail.com'
7-
__version__ = '0.3.1'
7+
__version__ = '0.4.0.dev2'
88

99
from ctgan.demo import load_demo
1010
from ctgan.synthesizers.ctgan import CTGANSynthesizer

ctgan/data_transformer.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,18 @@ def convert_column_name_value_to_id(self, column_name, value):
212212
break
213213
if column_transform_info.column_type == "discrete":
214214
discrete_counter += 1
215+
215216
column_id += 1
216217

218+
else:
219+
raise ValueError(f"The column_name `{column_name}` doesn't exist in the data.")
220+
221+
one_hot = column_transform_info.transform.transform(np.array([value]))[0]
222+
if sum(one_hot) == 0:
223+
raise ValueError(f"The value `{value}` doesn't exist in the column `{column_name}`.")
224+
217225
return {
218226
"discrete_column_id": discrete_counter,
219227
"column_id": column_id,
220-
"value_id": np.argmax(column_transform_info.transform.transform(np.array([value]))[0])
228+
"value_id": np.argmax(one_hot)
221229
}

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.3.1
2+
current_version = 0.4.0.dev2
33
commit = True
44
tag = True
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
history = history_file.read()
1313

1414
install_requires = [
15-
'torch<2,>=1.0',
16-
'torchvision<1,>=0.4.2',
17-
'scikit-learn<0.24,>=0.21',
18-
'numpy<2,>=1.17.4',
19-
'pandas<1.1.5,>=0.24',
20-
'rdt>=0.2.7,<0.4',
2115
'packaging',
16+
'numpy>=1.18.0,<2',
17+
'pandas>=1.1,<1.1.5',
18+
'scikit-learn>=0.23,<1',
19+
'torch>=1.4,<2',
20+
'torchvision>=0.5.0,<1',
21+
'rdt>=0.4.0,<0.5',
2222
]
2323

2424
setup_requires = [
@@ -99,6 +99,6 @@
9999
test_suite='tests',
100100
tests_require=tests_require,
101101
url='https://github.com/sdv-dev/CTGAN',
102-
version='0.3.1',
102+
version='0.4.0.dev2',
103103
zip_safe=False,
104104
)

0 commit comments

Comments
 (0)