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

Added directions on how to import IceVision without wildcard imports #1127

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions notebooks/getting_started_instance_segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@
"from icevision.all import *"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Alternative option of importing icevision\n",
"\n",
"In some environments wildcard imports are not allowed (eg: Kubeflow Pipelines & distributed environment that rely on pickling). \n",
"\n",
"In that case you can call `import icevision.all as iv` instead of `from icevision.all import *`\n",
"\n",
"In that case you should reference icevision objects with the `iv.` prefix, so for instance one would do `iv.Dataset` instead of the regular approach of just doing `Dataset`, same for any other icevision object (eg: `iv.tfms.A.Adapter` instead of `tfms.A.Adapter` etc)."
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down
13 changes: 13 additions & 0 deletions notebooks/getting_started_keypoint_detection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,19 @@
"from icevision.all import *"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Alternative option of importing icevision\n",
"\n",
"In some environments wildcard imports are not allowed (eg: Kubeflow Pipelines & distributed environment that rely on pickling). \n",
"\n",
"In that case you can call `import icevision.all as iv` instead of `from icevision.all import *`\n",
"\n",
"In that case you should reference icevision objects with the `iv.` prefix, so for instance one would do `iv.Dataset` instead of the regular approach of just doing `Dataset`, same for any other icevision object (eg: `iv.tfms.A.Adapter` instead of `tfms.A.Adapter` etc)."
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down
13 changes: 13 additions & 0 deletions notebooks/getting_started_object_detection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@
"from icevision.all import *"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Alternative option of importing icevision\n",
"\n",
"In some environments wildcard imports are not allowed (eg: Kubeflow Pipelines & distributed environment that rely on pickling). \n",
"\n",
"In that case you can call `import icevision.all as iv` instead of `from icevision.all import *`\n",
"\n",
"In that case you should reference icevision objects with the `iv.` prefix, so for instance one would do `iv.Dataset` instead of the regular approach of just doing `Dataset`, same for any other icevision object (eg: `iv.tfms.A.Adapter` instead of `tfms.A.Adapter` etc)."
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down
27 changes: 22 additions & 5 deletions notebooks/getting_started_semantic_segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,20 @@
"from icevision.all import *"
]
},
{
"cell_type": "markdown",
"id": "13d6ff3e",
"metadata": {},
"source": [
"### Alternative option of importing icevision\n",
"\n",
"In some environments wildcard imports are not allowed (eg: Kubeflow Pipelines & distributed environment that rely on pickling). \n",
"\n",
"In that case you can call `import icevision.all as iv` instead of `from icevision.all import *`\n",
"\n",
"In that case you should reference icevision objects with the `iv.` prefix, so for instance one would do `iv.Dataset` instead of the regular approach of just doing `Dataset`, same for any other icevision object (eg: `iv.tfms.A.Adapter` instead of `tfms.A.Adapter` etc)."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -581,11 +595,9 @@
}
],
"metadata": {
"interpreter": {
"hash": "fe738d56747ed9c8891b1c97864a5c22a0f14bdf3b7e6db02ccceae30cfa1132"
},
"kernelspec": {
"display_name": "Python 3.8.12 64-bit",
"display_name": "Python 3.10.4 64-bit",
"language": "python",
"name": "python3"
},
"language_info": {
Expand All @@ -598,7 +610,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.10.4"
},
"vscode": {
"interpreter": {
"hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"
}
}
},
"nbformat": 4,
Expand Down