Skip to content

Methods to query the metrics (as in DSS Metrics) of a MES or a ME (Sourcery refactored)#143

Merged
lpenet merged 1 commit into
perso/lpenet/model-evaluation-store-metricsfrom
sourcery/perso/lpenet/model-evaluation-store-metrics
Apr 9, 2021
Merged

Methods to query the metrics (as in DSS Metrics) of a MES or a ME (Sourcery refactored)#143
lpenet merged 1 commit into
perso/lpenet/model-evaluation-store-metricsfrom
sourcery/perso/lpenet/model-evaluation-store-metrics

Conversation

@sourcery-ai

@sourcery-ai sourcery-ai Bot commented Apr 7, 2021

Copy link
Copy Markdown

Pull Request #142 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the perso/lpenet/model-evaluation-store-metrics branch, then run:

git fetch origin sourcery/perso/lpenet/model-evaluation-store-metrics
git merge --ff-only FETCH_HEAD
git reset HEAD^

@sourcery-ai
sourcery-ai Bot requested a review from lpenet April 7, 2021 14:30
"""
items = self.client._perform_json("GET", "/projects/%s/modelevaluationstores/%s/runs/" % (self.project_key, self.mes_id))
if as_type == "objects" or as_type == "object":
if as_type in ["objects", "object"]:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function DSSModelEvaluationStore.__init__.get_zone.move_to_zone.share_to_zone.unshare_from_zone.list_model_evaluations refactored with the following changes:

@sourcery-ai

sourcery-ai Bot commented Apr 7, 2021

Copy link
Copy Markdown
Author

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.07%.

Quality metrics Before After Change
Complexity 0.88 ⭐ 0.82 ⭐ -0.06 👍
Method Length 24.26 ⭐ 24.19 ⭐ -0.07 👍
Working memory 6.71 🙂 6.71 🙂 0.00
Quality 86.77% 86.84% 0.07% 👍
Other metrics Before After Change
Lines 237 237 0
Changed files Quality Before Quality After Quality Change
dataikuapi/dss/modelevaluationstore.py 86.77% ⭐ 86.84% ⭐ 0.07% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
dataikuapi/dss/modelevaluationstore.py DSSModelEvaluationStore.__init__.get_zone.move_to_zone.share_to_zone.unshare_from_zone.create_model_evaluation 3 ⭐ 82 🙂 18 ⛔ 57.71% 🙂 Extract out complex expressions
dataikuapi/dss/modelevaluationstore.py DSSModelEvaluationStore.__init__.get_zone.move_to_zone.share_to_zone.unshare_from_zone.DSSModelEvaluation.put_file 0 ⭐ 28 ⭐ 12 😞 76.44% ⭐ Extract out complex expressions
dataikuapi/dss/modelevaluationstore.py DSSModelEvaluationStore.__init__.get_zone.move_to_zone.share_to_zone.unshare_from_zone.DSSModelEvaluation.get_file 0 ⭐ 25 ⭐ 10 😞 80.57% ⭐ Extract out complex expressions
dataikuapi/dss/modelevaluationstore.py DSSModelEvaluationStore.__init__.get_zone.move_to_zone.share_to_zone.unshare_from_zone.DSSModelEvaluation.delete_file 0 ⭐ 25 ⭐ 10 😞 80.57% ⭐ Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@lpenet
lpenet merged commit d035605 into perso/lpenet/model-evaluation-store-metrics Apr 9, 2021
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.

1 participant