Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Use view extension for exploring the databases (not ready to merge)#1223

Open
jmancewicz wants to merge 2 commits into
NVIDIA:masterfrom
jmancewicz:improve-explore-the-db
Open

Use view extension for exploring the databases (not ready to merge)#1223
jmancewicz wants to merge 2 commits into
NVIDIA:masterfrom
jmancewicz:improve-explore-the-db

Conversation

@jmancewicz

Copy link
Copy Markdown
Contributor

This is a move to use the view extensions to explore the databases.

As it is, it breaks the original image classification exploration.

data extensions need two methods, can_explore, which is used to enable the "explore the db" button, and get_data which retrieves data from the databases, and returns it in the same format that inference would.

Included in this PR is the imageSegmentation data view extension changes.

screen shot 2016-10-27 at 10 46 28 am

@jmancewicz jmancewicz changed the title Use view extension for Exploring the databases (not ready to merge) Use view extension for exploring the databases (not ready to merge) Oct 27, 2016
@jmancewicz

jmancewicz commented Oct 27, 2016

Copy link
Copy Markdown
Contributor Author

@gheinrich can you have a look at this? I'm moving on the the other data extensions, and wanted to get your feedback before I finish them.

@gheinrich gheinrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I still need to keep looking into this but this looks good!

raise NotImplementedError

@staticmethod
def can_explore():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why don't you have get_data() return None by default and check the return value on caller side? This way, sub-classes only have to override get_data()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't because get_data is expensive to compute and the data would be thrown away in that context.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also, when all the view extensions are converted, then the can_explore might just go away.

# view options
if kwargs['colormap'] == 'dataset':
if not COLOR_PALETTE_ATTRIBUTE in dataset.extension_userdata or \
if COLOR_PALETTE_ATTRIBUTE not in dataset.extension_userdata or \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

whoops, thanks!

<script>
$('#view_extension_id_{{ index }}').on("change", function(){
var view_extension_id= $(this).val();
var href = "{{url_for('digits.dataset.generic.views.explore')}}" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can't you use the same syntax as in line 82 above?

@jmancewicz
jmancewicz force-pushed the improve-explore-the-db branch from a97e670 to fcd256a Compare November 7, 2016 19:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants