Skip to content

benchmark + model tutorial - #58

Merged
mschrimpf merged 15 commits into
mainfrom
mschrimpf/tutorial_example
Sep 19, 2022
Merged

mschrimpf merged 15 commits into
mainfrom
mschrimpf/tutorial_example

Conversation

@mschrimpf

@mschrimpf mschrimpf commented Sep 2, 2022 •

Copy link
Copy Markdown
Member

detail the steps to developing a benchmark (including data and metric) + a model, as well as the final submission to brain-score.

@mschrimpf mschrimpf changed the title Benchmark tutorial benchmark + model tutorial Sep 2, 2022
@eghbalhosseini

Copy link
Copy Markdown
Contributor

I went through the benchmark tutorial,
general comment, I'd suggest start with an established benchmark (section 3) and within each section (data,metric) split it to existing vs user defined component. also I would say having a model section would help ( right now its vague how you would add the model data )
other comments below in no specific order:

-the code should contain the imports such as
from brainscore_language.metrics.linear_predictivity import linear_regression
or
'from brainscore_language import load_dataset'

-link to Pereira2018 data packaging is actually futrell
I dont know what this is
reading_times = parse_experiment_data(...)

currently load_dataset fails due to
TypeError: fetch_file() got an unexpected keyword argument 'version_id'

  • I think load_dataset , load_metric are too abstract at this point, you have function call load_dataset('mydata') but not clear where you created 'mydata', you do define 'pearsonr' metric though, is it necessary to use load_dataset load_metric methods all the time?

  • in the metric section
    score = Score(np.abs(rvalue))
    you're not saying what Score is doing.

  • you talk about model outputting reading times, but if you refer to where that gets computed, it would be less confusing

  • it worths talking about registries here too, as you talk about user defined components

  • for unit-tests is there a minimal set of test you are imagining to be added for every test?
    I couldn't run the code because the data wasnt loading, it would be better if I could run it so that I can create a minimal code that does all the steps - something similar to tutorials on google colabs

@mschrimpf

mschrimpf commented Sep 12, 2022 •

Copy link
Copy Markdown
Member Author

general comment, I'd suggest start with an established benchmark (section 3) and within each section (data,metric) split it to existing vs user defined component.

Not sure I understand, every data metric and benchmark is user defined. Can you suggest changes?

also I would say having a model section would help ( right now its vague how you would add the model data )

There is https://brain-score-language--58.org.readthedocs.build/en/58/modules/model_tutorial.html, is this what you mean?

-the code should contain the imports such as
from brainscore_language.metrics.linear_predictivity import linear_regression
or
'from brainscore_language import load_dataset'

done

-link to Pereira2018 data packaging is actually futrell

fixed

I dont know what this is
reading_times = parse_experiment_data(...)

parse_experiment_data is supposed to be some user-defined function that actually loads the experimental data from some other file structure. I tried to clarify but am not sure what to write. How would you make this more clear?

currently load_dataset fails due to
TypeError: fetch_file() got an unexpected keyword argument 'version_id'

should be addressed via a brainio update, see #66

I think load_dataset , load_metric are too abstract at this point, you have function call load_dataset('mydata') but not clear where you created 'mydata', you do define 'pearsonr' metric though, is it necessary to use load_dataset load_metric methods all the time?

What would you propose instead?

in the metric section
score = Score(np.abs(rvalue))
you're not saying what Score is doing.

attempted to clarify

you talk about model outputting reading times, but if you refer to where that gets computed, it would be less confusing

It's up to the model to decide how to implement this, so there's not a single place we can refer to.

it worths talking about registries here too, as you talk about user defined components

Do you mean the {data, metric, benchmark, model} plugin registries?

for unit-tests is there a minimal set of test you are imagining to be added for every test?

unspecified so far. Let's discuss.

I couldn't run the code because the data wasnt loading, it would be better if I could run it so that I can create a minimal code that does all the steps - something similar to tutorials on google colabs

We can put this in a jupyter notebook or a colab, would that be better?

@mschrimpf

Copy link
Copy Markdown
Member Author

I'll merge this for now -- @eghbalhosseini if there are remaining confusions, please open an issue and let's tackle them in a new PR.

@mschrimpf
mschrimpf merged commit b03ea2c into main Sep 19, 2022
@mschrimpf
mschrimpf deleted the mschrimpf/tutorial_example branch September 19, 2022 13:55
mschrimpf added a commit that referenced this pull request Oct 26, 2022
* add test_examples script

from https://github.com/brain-score/brain-score/blob/5e43c9495eb3de93bfc12ab6b2421c66ef4f4fc4/tests/test_examples.py

* delete examples test script (using docs for now)

* add benchmark tutorial

* add newlines to render code blocks

* add newline to render list

* yet another missing newline

* a wild newline appeared

* update identifier example to `'benchmarkid-metricid'`

* fix italics

* add model tutorial

* add imports

* fix Pereira2018 data packaging link

* attempt to clarify `parse_experiment_data`

* clarify score in metric
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