Skip to content

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

Merged
merged 30 commits into from
Mar 31, 2021
Merged

Examples #129

merged 30 commits into from
Mar 31, 2021

Conversation

msokoloff1
Copy link
Contributor

@msokoloff1 msokoloff1 commented Mar 29, 2021

  • First complete release of working examples.
  • Stores creds and installs dependencies for colab.

@msokoloff1 msokoloff1 requested a review from nmaswood March 30, 2021 14:46
@gdj0nes
Copy link

gdj0nes commented Mar 30, 2021

Link the directories in the Readme for /examples

},
{
"cell_type": "code",
"execution_count": 2,

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.

https://github.com/alexandercbooth/nblint

Copy link
Contributor Author

@msokoloff1 msokoloff1 Mar 30, 2021

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.

Copy link
Contributor Author

@msokoloff1 msokoloff1 Mar 30, 2021

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.

"metadata": {},
"outputs": [],
"source": [
"from labelbox.schema.ontology import OntologyBuilder, Tool, Classification, Option\n",

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

Copy link
Contributor Author

@msokoloff1 msokoloff1 Mar 30, 2021

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.

@@ -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))

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?

Copy link

@nmaswood nmaswood left a 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",

Choose a reason for hiding this comment

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

lol this may change

@msokoloff1 msokoloff1 merged commit 0b6edd5 into develop Mar 31, 2021
@msokoloff1 msokoloff1 deleted the examples branch March 31, 2021 22:59
@msokoloff1 msokoloff1 restored the examples branch March 31, 2021 23:00
@nmaswood nmaswood deleted the examples branch April 1, 2021 02:52
@msokoloff1 msokoloff1 restored the examples branch April 1, 2021 17:46
@msokoloff1 msokoloff1 deleted the examples branch May 13, 2021 20:19
@msokoloff1 msokoloff1 restored the examples branch May 14, 2021 14:36
msokoloff1 added a commit that referenced this pull request Sep 22, 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.

3 participants