Merged
Conversation
piercus
requested changes
Dec 5, 2022
piercus
approved these changes
Dec 5, 2022
Owner
|
FAILED tests/test_evaluation/test_metrics/test_multi_task_metrics.py::MultiTaskMetric::test_evaluate - TypeError: list indices must be integers or slices, not str |
Codecov Report
@@ Coverage Diff @@
## multi-task #7 +/- ##
==============================================
- Coverage 89.04% 88.98% -0.06%
==============================================
Files 151 151
Lines 11537 11459 -78
Branches 1844 1839 -5
==============================================
- Hits 10273 10197 -76
+ Misses 997 995 -2
Partials 267 267
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
marouaneamz
commented
Dec 5, 2022
| if data_samples is None: | ||
| task_samples = None | ||
| else: | ||
| task_samples = [item.get(task_name) for item in data_samples] |
Author
There was a problem hiding this comment.
if the task does not exist, it will return None , and it is impossible to do set_pred for Nones
Author
There was a problem hiding this comment.
File "tools/train.py", line 164, in <module>
main()
File "tools/train.py", line 160, in main
runner.train()
File "/home/marouane/.local/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1659, in train
model = self.train_loop.run() # type: ignore
File "/home/marouane/.local/lib/python3.8/site-packages/mmengine/runner/loops.py", line 94, in run
self.runner.val_loop.run()
File "/home/marouane/.local/lib/python3.8/site-packages/mmengine/runner/loops.py", line 343, in run
self.run_iter(idx, data_batch)
File "/home/marouane/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/marouane/.local/lib/python3.8/site-packages/mmengine/runner/loops.py", line 363, in run_iter
outputs = self.runner.model.val_step(data_batch)
File "/home/marouane/.local/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 133, in val_step
return self._run_forward(data, mode='predict') # type: ignore
File "/home/marouane/.local/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 301, in _run_forward
results = self(**data, mode=mode)
File "/home/marouane/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/marouane/dev/mmclassification1.x/mmcls/models/classifiers/image.py", line 119, in forward
return self.predict(inputs, data_samples)
File "/home/marouane/dev/mmclassification1.x/mmcls/models/classifiers/image.py", line 244, in predict
return self.head.predict(feats, data_samples, **kwargs)
File "/home/marouane/dev/mmclassification1.x/mmcls/models/heads/multi_task_head.py", line 124, in predict
task_samples = head.predict(feats, task_samples)
File "/home/marouane/dev/mmclassification1.x/mmcls/models/heads/cls_head.py", line 130, in predict
predictions = self._get_predictions(cls_score, data_samples)
File "/home/marouane/dev/mmclassification1.x/mmcls/models/heads/cls_head.py", line 144, in _get_predictions
data_sample.set_pred_score(score).set_pred_label(label)
AttributeError: 'NoneType' object has no attribute 'set_pred_score'
piercus
requested changes
Dec 6, 2022
Co-authored-by: Colle <piercus@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.