-
Notifications
You must be signed in to change notification settings - Fork 68
Examples #129
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
Examples #129
Conversation
Link the directories in the Readme for /examples |
examples/basics/basics.ipynb
Outdated
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does execution_count
do? Should it just be 1
for all cells?
Is there a way to restore that to a default amount.
Also I would probably use nblint
just as a nice formatting tool on all notebooks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the cell execution order. I don't want to clear the notebooks because the outputs are useful if a user just wants to look at the expected behavior. I will look into nblint though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I added this code formatter to the repo. https://github.com/Labelbox/labelbox-python/blob/examples/examples/format_notebooks.py. It runs yapf with the same style used in the rest of the sdk. I also changed the execution count to be the order that the cells should be run. I don't want to totally clear the notebook because I think the notebooks will be referenced like documentation and the outputs are helpful.
examples/basics/ontologies.ipynb
Outdated
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from labelbox.schema.ontology import OntologyBuilder, Tool, Classification, Option\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you import everything from just label box
? why import from labels.schema.ontology
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't currently. I could change this to be top level but there could be a name conflict at some point. Classification here is a classification feature schema. In the future there will likely be other classifications.
examples/format_notebooks.py
Outdated
@@ -26,7 +26,7 @@ def format_file(file_name): | |||
cell['source'] = cell['source'][:-1] | |||
|
|||
with open(file_name, 'w') as file: | |||
file.write(json.dumps(data, indent = 4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol at this change ... who formats the formatter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I didn't get into the nitty-griity with the jupyter notebooks! Let me know if I should and I will take a second pass
" * Text\n", | ||
" * Video\n", | ||
"* A data row is a member of a dataset \n", | ||
"* A data row cannot exist without belonging to a dataset.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol this may change
Uh oh!
There was an error while loading. Please reload this page.