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

Remove access to changing TSDataset attributes #630

Merged
merged 35 commits into from
Mar 13, 2025
Merged

Conversation

DanilSmorchkov
Copy link
Collaborator

@DanilSmorchkov DanilSmorchkov commented Mar 11, 2025

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Proposed Changes

See #598

Closing issues

Closed #598

@DanilSmorchkov DanilSmorchkov self-assigned this Mar 11, 2025
Copy link

github-actions bot commented Mar 11, 2025

🚀 Deployed on https://deploy-preview-630--etna-docs.netlify.app

@github-actions github-actions bot temporarily deployed to pull request March 11, 2025 20:23 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 06:37 Inactive
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 92.89941% with 12 lines in your changes missing coverage. Please review.

Project coverage is 88.88%. Comparing base (5156e86) to head (5dfb9e8).

Files with missing lines Patch % Lines
etna/datasets/tsdataset.py 95.49% 5 Missing ⚠️
etna/analysis/utils.py 0.00% 4 Missing ⚠️
etna/analysis/forecast/plots.py 50.00% 1 Missing ⚠️
etna/analysis/forecast/utils.py 66.66% 1 Missing ⚠️
etna/models/mixins.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #630      +/-   ##
==========================================
- Coverage   90.50%   88.88%   -1.62%     
==========================================
  Files         259      259              
  Lines       18060    18072      +12     
==========================================
- Hits        16345    16064     -281     
- Misses       1715     2008     +293     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 07:55 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 08:05 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 08:21 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 08:55 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 09:06 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 09:12 Inactive
@@ -67,7 +67,7 @@ def plot_trend(
segments = ts.segments

_, ax = _prepare_axes(num_plots=len(segments), columns_num=columns_num, figsize=figsize)
df = ts.df
df = ts._df
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably replace it with smth like to_pandas() in the future. Now we avoid it because of additional copying but it could be not a problem in copy-on-write mode on new pandas.

@@ -271,8 +271,8 @@ def _validate_nans(self, y_true: TSDataset, y_pred: TSDataset):
ValueError:
If there are NaNs in ``y_true`` or ``y_pred``
"""
df_true = y_true.df.loc[:, pd.IndexSlice[:, "target"]]
df_pred = y_pred.df.loc[:, pd.IndexSlice[:, "target"]]
df_true = y_true._df.loc[:, pd.IndexSlice[:, "target"]]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably replace it with to_pandas in the future.

@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 20:03 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 20:16 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 12, 2025 20:46 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 13, 2025 06:37 Inactive
Copy link

review-notebook-app bot commented Mar 13, 2025

View / edit / reply to this conversation on ReviewNB

d-a-bunin commented on 2025-03-13T07:05:46Z
----------------------------------------------------------------

Line #62.            horizon = len(ts.to_pandas())

Couldn't we use ts.size here?


@github-actions github-actions bot temporarily deployed to pull request March 13, 2025 07:56 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 13, 2025 10:23 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 13, 2025 11:03 Inactive
@DanilSmorchkov DanilSmorchkov merged commit f05e030 into master Mar 13, 2025
14 checks passed
@DanilSmorchkov DanilSmorchkov deleted the issue-598 branch March 13, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove access to changing TSDataset attributes
2 participants