Skip to content

Commit

Permalink
Version bump to 3.4.0 (#1613)
Browse files Browse the repository at this point in the history
* Version bump

* Disable multi gpu

* Postpone removal of some classes in 3.5
  • Loading branch information
BloodAxe authored Nov 6, 2023
1 parent 46cdc18 commit 2760c0b
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 19 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ NOTEBOOKS_TO_RUN += notebooks/how_to_use_knowledge_distillation_for_classificati

# If there are additional notebooks that must not be executed, but still should be checked for version match, add them here
NOTEBOOKS_TO_CHECK := $(NOTEBOOKS_TO_RUN)
NOTEBOOKS_TO_CHECK += notebooks/yolo_nas_pose_eval_with_pycocotools.ipynb

# This Makefile target runs notebooks listed below and converts them to markdown files in documentation/source/
run_and_convert_notebooks_to_docs: $(NOTEBOOKS_TO_RUN)
Expand Down
8 changes: 2 additions & 6 deletions documentation/source/models_export.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@ A new export API is introduced in SG 3.2.0. It is aimed to simplify the export p


```python
!pip install super_gradients==3.3.1
!pip install -qq super_gradients==3.4.0
```

ERROR: Could not find a version that satisfies the requirement super_gradients==3.3.1 (from versions: 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.5.0, 2.6.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.1, 3.3.0)
ERROR: No matching distribution found for super_gradients==3.3.1


### Minimalistic export example

Let start with the most simple example of exporting a model to ONNX format.
Expand Down Expand Up @@ -531,7 +527,7 @@ result = session.run(outputs, {inputs[0]: image_bchw})
show_predictions_from_flat_format(image, result)
```

25%|██████████████████████████████ | 4/16 [00:11<00:33, 2.79s/it]
25%|█████████████████████████████████ | 4/16 [00:11<00:34, 2.91s/it]



Expand Down
4 changes: 2 additions & 2 deletions documentation/source/models_export_pose.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ We recommend to use the latest version of TensorRT available.


```python
!pip install -qq super-gradients==3.3.1
!pip install -qq super-gradients==3.4.0
```

### Minimalistic export example
Expand Down Expand Up @@ -630,7 +630,7 @@ result = session.run(outputs, {inputs[0]: image_bchw})
show_predictions_from_flat_format(image, result)
```

25%|█████████████████████████████████ | 4/16 [00:12<00:37, 3.15s/it]
25%|█████████████████████████████████ | 4/16 [00:12<00:37, 3.10s/it]



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"outputs": [],
"source": [
"!pip install -qq super_gradients==3.3.1"
"!pip install -qq super_gradients==3.4.0"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebooks/transfer_learning_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}
],
"source": [
"! pip install -qq super-gradients==3.3.1"
"! pip install -qq super-gradients==3.4.0"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebooks/what_are_recipes_and_how_to_use.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{
"cell_type": "code",
"source": [
"!pip install -q super-gradients==3.3.1"
"!pip install -q super-gradients==3.4.0"
],
"metadata": {
"id": "8uZM-4va5Rpu",
Expand Down
12 changes: 12 additions & 0 deletions notebooks/yolo_nas_pose_eval_with_pycocotools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
},
"id": "f36fcd2e6daa861c"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"!pip install -qq super_gradients==3.4.0"
],
"metadata": {
"collapsed": false
},
"id": "319deb6e3293a2c9"
},
{
"cell_type": "markdown",
"source": [
Expand Down
2 changes: 1 addition & 1 deletion src/super_gradients/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.3.1"
__version__ = "3.4.0"

from super_gradients.common import init_trainer, is_distributed, object_names
from super_gradients.training import losses, utils, datasets_utils, DataAugmentation, Trainer, KDTrainer, QATTrainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"execution_count": null,
"outputs": [],
"source": [
"!pip install super_gradients==3.3.1"
"!pip install -qq super_gradients==3.4.0"
],
"metadata": {
"collapsed": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"execution_count": 24,
"outputs": [],
"source": [
"!pip install -qq super-gradients==3.3.1"
"!pip install -qq super-gradients==3.4.0"
],
"metadata": {
"collapsed": false,
Expand Down
8 changes: 4 additions & 4 deletions src/super_gradients/training/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
from super_gradients.training.utils import make_divisible as _make_divisible_current_version, HpmStruct as CurrVersionHpmStruct


@deprecated(deprecated_since="3.1.0", removed_from="3.4.0", target=_make_divisible_current_version)
@deprecated(deprecated_since="3.1.0", removed_from="3.5.0", target=_make_divisible_current_version)
def make_divisible(x: int, divisor: int, ceil: bool = True) -> int:
"""
Returns x evenly divisible by divisor.
Expand All @@ -144,17 +144,17 @@ def make_divisible(x: int, divisor: int, ceil: bool = True) -> int:
return _make_divisible_current_version(x=x, divisor=divisor, ceil=ceil)


@deprecated(deprecated_since="3.1.0", removed_from="3.4.0", target=BasicResNetBlock, reason="This block was renamed to BasicResNetBlock for better clarity.")
@deprecated(deprecated_since="3.1.0", removed_from="3.5.0", target=BasicResNetBlock, reason="This block was renamed to BasicResNetBlock for better clarity.")
class BasicBlock(BasicResNetBlock):
...


@deprecated(deprecated_since="3.1.0", removed_from="3.4.0", target=NewBottleneck, reason="This block was renamed to BasicResNetBlock for better clarity.")
@deprecated(deprecated_since="3.1.0", removed_from="3.5.0", target=NewBottleneck, reason="This block was renamed to BasicResNetBlock for better clarity.")
class Bottleneck(NewBottleneck):
...


@deprecated(deprecated_since="3.1.0", removed_from="3.4.0", target=CurrVersionHpmStruct)
@deprecated(deprecated_since="3.1.0", removed_from="3.5.0", target=CurrVersionHpmStruct)
class HpmStruct(CurrVersionHpmStruct):
...

Expand Down
3 changes: 2 additions & 1 deletion tests/integration_tests/yolo_nas_pose_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from torch.utils.data import DataLoader

from super_gradients import setup_device
from super_gradients.common import MultiGPUMode
from super_gradients.common.abstractions.abstract_logger import get_logger
from super_gradients.common.environment.cfg_utils import load_dataset_params
from super_gradients.common.object_names import Models
Expand Down Expand Up @@ -65,7 +66,7 @@ def _coco2017_val_yolo_nas_pose(self) -> DataLoader:

def _predict_and_evaluate(self, model, experiment_name):
device = "cuda" if torch.cuda.is_available() else "cpu"
setup_device(device=device)
setup_device(device=device, multi_gpu=MultiGPUMode.OFF)
trainer = Trainer(experiment_name)
metric = PoseEstimationMetrics(
post_prediction_callback=model.get_post_prediction_callback(conf=0.01, iou=0.7, post_nms_max_predictions=30),
Expand Down

0 comments on commit 2760c0b

Please sign in to comment.