We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please indicate the following details about the environment in which you found the bug:
Dataframe columns : ticker object date datetime64[ns] Close float64 Low float64 High float64 Open float64 Volume float64 ff_co_name object ff_major_ind_name object fg_factset_ind object exchange object dtype: object
On running model.fit on this time series data, the execution fails with the error message ValueError: The parameter loc has invalid values.
dailytimeseries.csv.zip
daily_timeseries = pd.read_csv('dailytimeseries.csv')
entity_columns = ["ticker"]
context_columns = ["ff_co_name", "ff_major_ind_name", "fg_factset_ind", "exchange"]
sequence_index = "date"
model = PAR(entity_columns=entity_columns, context_columns=context_columns, sequence_index=sequence_index,)
model.fit(daily_timeseries)
/usr/local/lib/python3.7/dist-packages/scipy/stats/_continuous_distns.py:4798: RuntimeWarning: divide by zero encountered in true_divide return c**2 / (c**2 - n**2) /usr/local/lib/python3.7/dist-packages/scipy/stats/_distn_infrastructure.py:2407: RuntimeWarning: invalid value encountered in double_scalars Lhat = muhat - Shat*mu --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-29-c1a28f080e61> in <module>() ----> 1 model.fit(daily_timeseries) 5 frames /usr/local/lib/python3.7/dist-packages/sdv/timeseries/base.py in fit(self, timeseries_data) 207 208 LOGGER.debug('Fitting %s model to table %s', self.__class__.__name__, self._metadata.name) --> 209 self._fit(transformed) 210 211 def get_metadata(self): /usr/local/lib/python3.7/dist-packages/sdv/timeseries/deepecho.py in _fit(self, timeseries_data) 83 84 # Validate and fit ---> 85 self._model.fit_sequences(sequences, context_types, data_types) 86 87 def _sample(self, context=None, sequence_length=None): /usr/local/lib/python3.7/dist-packages/deepecho/models/par.py in fit_sequences(self, sequences, context_types, data_types) 330 331 optimizer.zero_grad() --> 332 loss = self._compute_loss(X_padded[1:, :, :], Y_padded[:-1, :, :], seq_len) 333 loss.backward() 334 if self.verbose: /usr/local/lib/python3.7/dist-packages/deepecho/models/par.py in _compute_loss(self, X_padded, Y_padded, seq_len) 368 for i in range(batch_size): 369 dist = torch.distributions.normal.Normal( --> 370 mu[:seq_len[i], i], sigma[:seq_len[i], i]) 371 log_likelihood += torch.sum(dist.log_prob(X_padded[-seq_len[i]:, i, mu_idx])) 372 /usr/local/lib/python3.7/dist-packages/torch/distributions/normal.py in __init__(self, loc, scale, validate_args) 48 else: 49 batch_shape = self.loc.size() ---> 50 super(Normal, self).__init__(batch_shape, validate_args=validate_args) 51 52 def expand(self, batch_shape, _instance=None): /usr/local/lib/python3.7/dist-packages/torch/distributions/distribution.py in __init__(self, batch_shape, event_shape, validate_args) 51 continue # skip checking lazily-constructed args 52 if not constraint.check(getattr(self, param)).all(): ---> 53 raise ValueError("The parameter {} has invalid values".format(param)) 54 super(Distribution, self).__init__() 55 ValueError: The parameter loc has invalid values
The text was updated successfully, but these errors were encountered:
Hi @a1code. This is actually an issue with our code, thanks for catching it! I'm currently working on a fix, so this should be patched soon.
Sorry, something went wrong.
Hi fealho! How did you fix this ValueError? Could you show me some details? I met the same problem and want to fix my code.
@fealho
fealho
Successfully merging a pull request may close this issue.
Environment Details
Please indicate the following details about the environment in which you found the bug:
Error Description
Dataframe columns :
ticker object
date datetime64[ns]
Close float64
Low float64
High float64
Open float64
Volume float64
ff_co_name object
ff_major_ind_name object
fg_factset_ind object
exchange object
dtype: object
On running model.fit on this time series data, the execution fails with the error message ValueError: The parameter loc has invalid values.
Steps to reproduce
dailytimeseries.csv.zip
daily_timeseries = pd.read_csv('dailytimeseries.csv')
entity_columns = ["ticker"]
context_columns = ["ff_co_name", "ff_major_ind_name", "fg_factset_ind", "exchange"]
sequence_index = "date"
model = PAR(entity_columns=entity_columns, context_columns=context_columns, sequence_index=sequence_index,)
model.fit(daily_timeseries)
The text was updated successfully, but these errors were encountered: