deepecho 0.7.1.dev0__tar.gz → 0.8.1.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepecho
3
- Version: 0.7.1.dev0
3
+ Version: 0.8.1.dev0
4
4
  Summary: Create sequential synthetic data of mixed types using a GAN.
5
5
  Author-email: "DataCebo, Inc." <info@sdv.dev>
6
- License: BSL-1.1
6
+ License-Expression: BUSL-1.1
7
7
  Project-URL: Source Code, https://github.com/sdv-dev/Deepecho/
8
8
  Project-URL: Issue Tracker, https://github.com/sdv-dev/Deepecho/issues
9
9
  Project-URL: Twitter, https://twitter.com/sdv_dev
@@ -11,7 +11,6 @@ Project-URL: Chat, https://bit.ly/sdv-slack-invite
11
11
  Keywords: deepecho,DeepEcho
12
12
  Classifier: Development Status :: 2 - Pre-Alpha
13
13
  Classifier: Intended Audience :: Developers
14
- Classifier: License :: Free for non-commercial use
15
14
  Classifier: Natural Language :: English
16
15
  Classifier: Programming Language :: Python :: 3
17
16
  Classifier: Programming Language :: Python :: 3.9
@@ -2,7 +2,7 @@
2
2
 
3
3
  __author__ = 'DataCebo, Inc.'
4
4
  __email__ = 'info@sdv.dev'
5
- __version__ = '0.7.1.dev0'
5
+ __version__ = '0.8.1.dev0'
6
6
  __path__ = __import__('pkgutil').extend_path(__path__, __name__)
7
7
 
8
8
  from deepecho.demo import load_demo
@@ -6,6 +6,17 @@ import tqdm
6
6
  from deepecho.sequences import assemble_sequences
7
7
 
8
8
 
9
+ def _format_score(score):
10
+ """Format a score as a fixed-length string ``±XX.XX``.
11
+
12
+ Values are clipped to the range ``[-99.99, +99.99]`` so the result
13
+ is always exactly 6 characters.
14
+ """
15
+ score = max(-99.99, min(99.99, score))
16
+ sign = '+' if score >= 0 else '-'
17
+ return f'{sign}{abs(score):05.2f}'
18
+
19
+
9
20
  class DeepEcho:
10
21
  """The base class for DeepEcho models."""
11
22
 
@@ -7,7 +7,7 @@ import pandas as pd
7
7
  import torch
8
8
  from tqdm import tqdm
9
9
 
10
- from deepecho.models.base import DeepEcho
10
+ from deepecho.models.base import DeepEcho, _format_score
11
11
 
12
12
  LOGGER = logging.getLogger(__name__)
13
13
 
@@ -547,7 +547,10 @@ class BasicGANModel(DeepEcho):
547
547
  if self._verbose:
548
548
  d_loss = discriminator_score.item()
549
549
  g_loss = generator_score.item()
550
- iterator.set_description(f'Epoch {epoch + 1} | D Loss {d_loss} | G Loss {g_loss}')
550
+ iterator.set_description(
551
+ f'Epoch {epoch + 1} | D Loss {_format_score(d_loss)}'
552
+ f' | G Loss {_format_score(g_loss)}'
553
+ )
551
554
 
552
555
  def sample_sequence(self, context, sequence_length=None):
553
556
  """Sample a single sequence conditioned on context.
@@ -7,7 +7,7 @@ import pandas as pd
7
7
  import torch
8
8
  from tqdm import tqdm
9
9
 
10
- from deepecho.models.base import DeepEcho
10
+ from deepecho.models.base import DeepEcho, _format_score
11
11
 
12
12
  LOGGER = logging.getLogger(__name__)
13
13
 
@@ -336,8 +336,8 @@ class PARModel(DeepEcho):
336
336
 
337
337
  iterator = tqdm(range(self.epochs), disable=(not self.verbose))
338
338
  if self.verbose:
339
- pbar_description = 'Loss ({loss:.3f})'
340
- iterator.set_description(pbar_description.format(loss=0))
339
+ pbar_description = 'Loss ({loss})'
340
+ iterator.set_description(pbar_description.format(loss=_format_score(0)))
341
341
 
342
342
  # Reset loss_values dataframe
343
343
  self.loss_values = pd.DataFrame(columns=['Epoch', 'Loss'])
@@ -364,7 +364,7 @@ class PARModel(DeepEcho):
364
364
  self.loss_values = epoch_loss_df
365
365
 
366
366
  if self.verbose:
367
- iterator.set_description(pbar_description.format(loss=loss.item()))
367
+ iterator.set_description(pbar_description.format(loss=_format_score(loss.item())))
368
368
 
369
369
  optimizer.step()
370
370
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepecho
3
- Version: 0.7.1.dev0
3
+ Version: 0.8.1.dev0
4
4
  Summary: Create sequential synthetic data of mixed types using a GAN.
5
5
  Author-email: "DataCebo, Inc." <info@sdv.dev>
6
- License: BSL-1.1
6
+ License-Expression: BUSL-1.1
7
7
  Project-URL: Source Code, https://github.com/sdv-dev/Deepecho/
8
8
  Project-URL: Issue Tracker, https://github.com/sdv-dev/Deepecho/issues
9
9
  Project-URL: Twitter, https://twitter.com/sdv_dev
@@ -11,7 +11,6 @@ Project-URL: Chat, https://bit.ly/sdv-slack-invite
11
11
  Keywords: deepecho,DeepEcho
12
12
  Classifier: Development Status :: 2 - Pre-Alpha
13
13
  Classifier: Intended Audience :: Developers
14
- Classifier: License :: Free for non-commercial use
15
14
  Classifier: Natural Language :: English
16
15
  Classifier: Programming Language :: Python :: 3
17
16
  Classifier: Programming Language :: Python :: 3.9
@@ -5,7 +5,6 @@ authors = [{ name = 'DataCebo, Inc.', email = 'info@sdv.dev' }]
5
5
  classifiers = [
6
6
  'Development Status :: 2 - Pre-Alpha',
7
7
  'Intended Audience :: Developers',
8
- 'License :: Free for non-commercial use',
9
8
  'Natural Language :: English',
10
9
  'Programming Language :: Python :: 3',
11
10
  'Programming Language :: Python :: 3.9',
@@ -18,7 +17,8 @@ classifiers = [
18
17
  ]
19
18
  keywords = ['deepecho', 'DeepEcho']
20
19
  dynamic = ['version']
21
- license = { text = 'BSL-1.1' }
20
+ license = 'BUSL-1.1'
21
+ license-files = ['LICENSE']
22
22
  requires-python = '>=3.9,<3.15'
23
23
  readme = 'README.md'
24
24
  dependencies = [
@@ -83,7 +83,6 @@ readme = ['rundoc>=0.4.3,<0.5',]
83
83
 
84
84
  [tool.setuptools]
85
85
  include-package-data = true
86
- license-files = ['LICENSE']
87
86
 
88
87
  [tool.setuptools.packages.find]
89
88
  include = ['deepecho', 'deepecho.*']
@@ -128,7 +127,7 @@ use_parentheses = true
128
127
  collect_ignore = ['pyproject.toml']
129
128
 
130
129
  [tool.bumpversion]
131
- current_version = "0.7.1.dev0"
130
+ current_version = "0.8.1.dev0"
132
131
  parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?'
133
132
  serialize = [
134
133
  '{major}.{minor}.{patch}.{release}{candidate}',
File without changes
File without changes
File without changes