repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
src/webargs/testing.py
test_parse_querystring_args
assert
collection
28
import pytest import webtest from webargs.core import json class CommonTestCase(object): def create_app(self): """Return a WSGI app""" raise NotImplementedError("Must define create_app()") def create_testapp(self, app): return webtest.TestApp(app) def before_create_app(self): ...
{"name": "Fred"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/apps/flask_app.py
echo_use_kwargs_missing
assert
variable
85
from webargs.core import json from flask import Flask, jsonify as J, Response, request from flask.views import MethodView import marshmallow as ma from webargs import fields from webargs.flaskparser import parser, use_args, use_kwargs from webargs.core import MARSHMALLOW_VERSION_INFO def echo(): return J(parser.p...
kwargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_core.py
test_parse_json_not_called_when_json_not_a_location
assert
numeric_literal
38
import itertools import mock import datetime import pytest from marshmallow import Schema, post_load, pre_load, class_registry, validates_schema from werkzeug.datastructures import MultiDict as WerkMultiDict from django.utils.datastructures import MultiValueDict as DjMultiDict from bottle import MultiDict as BotMultiD...
0
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_core.py
test_handle_error_called_when_parsing_raises_error
assert
numeric_literal
45
import itertools import mock import datetime import pytest from marshmallow import Schema, post_load, pre_load, class_registry, validates_schema from werkzeug.datastructures import MultiDict as WerkMultiDict from django.utils.datastructures import MultiValueDict as DjMultiDict from bottle import MultiDict as BotMultiD...
2
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_core.py
test_parse_required_arg
assert
numeric_literal
39
import itertools import mock import datetime import pytest from marshmallow import Schema, post_load, pre_load, class_registry, validates_schema from werkzeug.datastructures import MultiDict as WerkMultiDict from django.utils.datastructures import MultiValueDict as DjMultiDict from bottle import MultiDict as BotMultiD...
42
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_core.py
test_parse_missing_list
assert
collection
36
import itertools import mock import datetime import pytest from marshmallow import Schema, post_load, pre_load, class_registry, validates_schema from werkzeug.datastructures import MultiDict as WerkMultiDict from django.utils.datastructures import MultiValueDict as DjMultiDict from bottle import MultiDict as BotMultiD...
{}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_core.py
test_parse
assert
variable
39
import itertools import mock import datetime import pytest from marshmallow import Schema, post_load, pre_load, class_registry, validates_schema from werkzeug.datastructures import MultiDict as WerkMultiDict from django.utils.datastructures import MultiValueDict as DjMultiDict from bottle import MultiDict as BotMultiD...
ret
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_core.py
test_parse_with_error_status_code_and_headers
assert
numeric_literal
48
import itertools import mock import datetime import pytest from marshmallow import Schema, post_load, pre_load, class_registry, validates_schema from werkzeug.datastructures import MultiDict as WerkMultiDict from django.utils.datastructures import MultiValueDict as DjMultiDict from bottle import MultiDict as BotMultiD...
418
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_core.py
test_default_can_be_none
assert
none_literal
37
import itertools import mock import datetime import pytest from marshmallow import Schema, post_load, pre_load, class_registry, validates_schema from werkzeug.datastructures import MultiDict as WerkMultiDict from django.utils.datastructures import MultiValueDict as DjMultiDict from bottle import MultiDict as BotMultiD...
None
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_core.py
test_is_json
assert
bool_literal
41
import itertools import mock import datetime import pytest from marshmallow import Schema, post_load, pre_load, class_registry, validates_schema from werkzeug.datastructures import MultiDict as WerkMultiDict from django.utils.datastructures import MultiValueDict as DjMultiDict from bottle import MultiDict as BotMultiD...
True
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_core.py
test_is_json
assert
bool_literal
40
import itertools import mock import datetime import pytest from marshmallow import Schema, post_load, pre_load, class_registry, validates_schema from werkzeug.datastructures import MultiDict as WerkMultiDict from django.utils.datastructures import MultiValueDict as DjMultiDict from bottle import MultiDict as BotMultiD...
False
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_djangoparser.py
test_parsing_in_class_based_view
assert
collection
14
from __future__ import unicode_literals import pytest from tests.apps.django_app.base.wsgi import application from webargs.testing import CommonTestCase class TestDjangoParser(CommonTestCase): def create_app(self): return application def test_parsing_in_class_based_view(self, testapp): asse...
{"name": "Fred"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_falconparser.py
test_invalid_json
assert
numeric_literal
18
import pytest from webargs.testing import CommonTestCase from tests.apps.falcon_app import create_app class TestFalconParser(CommonTestCase): def create_app(self): return create_app() def test_invalid_json(self, testapp): res = testapp.post( "/echo", '{"foo": "bar", }'...
400
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_falconparser.py
test_use_args_hook
assert
collection
12
import pytest from webargs.testing import CommonTestCase from tests.apps.falcon_app import create_app class TestFalconParser(CommonTestCase): def create_app(self): return create_app() def test_use_args_hook(self, testapp): assert testapp.get("/echo_use_args_hook?name=Fred").json ==
{"name": "Fred"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_falconparser.py
test_invalid_json
assert
collection
19
import pytest from webargs.testing import CommonTestCase from tests.apps.falcon_app import create_app class TestFalconParser(CommonTestCase): def create_app(self): return create_app() def test_invalid_json(self, testapp): res = testapp.post( "/echo", '{"foo": "bar", }'...
{"json": ["Invalid JSON body."]}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_json_cache_race_condition
assert
numeric_literal
47
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
42
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_json_cache_race_condition
assert
numeric_literal
48
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
23
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_nested_many_with_data_key
assert
collection
31
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
{}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_abort_called_on_validation_error
assert
numeric_literal
34
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
422
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_parse_form_returns_missing_if_no_form
assert
variable
20
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
missing
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_use_args_on_a_method_view
assert
collection
23
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
{"val": 42}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_abort_called_on_validation_error
assert
collection
36
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
[expected_msg]
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_abort_with_message
pytest.raises
variable
18
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
HTTPException)
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_abort_called_on_validation_error
assert
variable
37
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
ValidationError
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_parsing_view_args
assert
collection
23
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
{"view_arg": 42}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_use_kwargs_with_missing_data
assert
collection
23
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
{"username": "foo"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_abort_with_message
assert
string_literal
20
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
"custom error message"
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_flaskparser.py
test_nested_many_with_data_key
assert
collection
28
from __future__ import unicode_literals import threading from werkzeug.exceptions import HTTPException import mock import pytest from flask import Flask from webargs import fields, ValidationError, missing from webargs.flaskparser import parser, abort from webargs.core import MARSHMALLOW_VERSION_INFO, json from .app...
{"x_field": [{"id": 24}]}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser.py
test_nested_many_with_data_key
assert
collection
34
import asyncio import webtest import webtest_aiohttp import pytest from io import BytesIO from webargs.core import MARSHMALLOW_VERSION_INFO from webargs.testing import CommonTestCase from tests.apps.aiohttp_app import create_app class TestAIOHTTPParser(CommonTestCase): def create_app(self): return create_...
{}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser.py
test_parse_match_info
assert
collection
25
import asyncio import webtest import webtest_aiohttp import pytest from io import BytesIO from webargs.core import MARSHMALLOW_VERSION_INFO from webargs.testing import CommonTestCase from tests.apps.aiohttp_app import create_app class TestAIOHTTPParser(CommonTestCase): def create_app(self): return create_...
{"mymatch": 42}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser.py
test_use_args_on_method_handler
assert
collection
25
import asyncio import webtest import webtest_aiohttp import pytest from io import BytesIO from webargs.core import MARSHMALLOW_VERSION_INFO from webargs.testing import CommonTestCase from tests.apps.aiohttp_app import create_app class TestAIOHTTPParser(CommonTestCase): def create_app(self): return create_...
{"name": "World"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser.py
test_use_args_on_method_handler
assert
collection
26
import asyncio import webtest import webtest_aiohttp import pytest from io import BytesIO from webargs.core import MARSHMALLOW_VERSION_INFO from webargs.testing import CommonTestCase from tests.apps.aiohttp_app import create_app class TestAIOHTTPParser(CommonTestCase): def create_app(self): return create_...
{"name": "Steve"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser.py
test_nested_many_with_data_key
assert
collection
31
import asyncio import webtest import webtest_aiohttp import pytest from io import BytesIO from webargs.core import MARSHMALLOW_VERSION_INFO from webargs.testing import CommonTestCase from tests.apps.aiohttp_app import create_app class TestAIOHTTPParser(CommonTestCase): def create_app(self): return create_...
{"x_field": [{"id": 24}]}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser.py
test_nested_many_with_data_key
assert
collection
28
import asyncio import webtest import webtest_aiohttp import pytest from io import BytesIO from webargs.core import MARSHMALLOW_VERSION_INFO from webargs.testing import CommonTestCase from tests.apps.aiohttp_app import create_app class TestAIOHTTPParser(CommonTestCase): def create_app(self): return create_...
{"x_field": [{"id": 42}]}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser.py
test_multiple_args
assert
collection
28
import asyncio import webtest import webtest_aiohttp import pytest from io import BytesIO from webargs.core import MARSHMALLOW_VERSION_INFO from webargs.testing import CommonTestCase from tests.apps.aiohttp_app import create_app class TestAIOHTTPParser(CommonTestCase): def create_app(self): return create_...
{"first": "1", "last": "2"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser.py
test_schema_as_kwargs_view
assert
collection
26
import asyncio import webtest import webtest_aiohttp import pytest from io import BytesIO from webargs.core import MARSHMALLOW_VERSION_INFO from webargs.testing import CommonTestCase from tests.apps.aiohttp_app import create_app class TestAIOHTTPParser(CommonTestCase): def create_app(self): return create_...
{ "name": "Chandler" }
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser.py
test_use_args_multiple
assert
collection
28
import asyncio import webtest import webtest_aiohttp import pytest from io import BytesIO from webargs.core import MARSHMALLOW_VERSION_INFO from webargs.testing import CommonTestCase from tests.apps.aiohttp_app import create_app class TestAIOHTTPParser(CommonTestCase): def create_app(self): return create_...
{ "query_parsed": {"page": 2, "q": 10}, "json_parsed": {"name": "Steve"}, }
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_py3/test_aiohttpparser_async_functions.py
test_async_parse
assert
collection
32
import pytest import webtest_aiohttp from aiohttp.web import Application, json_response from webargs import fields from webargs.aiohttpparser import parser, use_args, use_kwargs hello_args = {"name": fields.Str(missing="World", validate=lambda n: len(n) >= 3)} async def echo_parse(request): parsed = await parser...
{"name": "Steve"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_pyramidparser.py
test_use_args_with_callable_view
assert
collection
11
from webargs.testing import CommonTestCase class TestPyramidParser(CommonTestCase): def create_app(self): from .apps.pyramid_app import create_app return create_app() def test_use_args_with_callable_view(self, testapp): assert testapp.get("/echo_callable?value=42").json ==
{"value": 42}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_pyramidparser.py
test_parse_matchdict
assert
collection
11
from webargs.testing import CommonTestCase class TestPyramidParser(CommonTestCase): def create_app(self): from .apps.pyramid_app import create_app return create_app() def test_parse_matchdict(self, testapp): assert testapp.get("/echo_matchdict/42").json ==
{"mymatch": 42}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_tornadoparser.py
test_get_value_basic
assert
numeric_literal
26
from webargs.core import json import mock import pytest import marshmallow as ma import tornado.web import tornado.httputil import tornado.httpserver import tornado.http1connection import tornado.concurrent import tornado.ioloop from tornado.testing import AsyncHTTPTestCase from webargs import fields, missing from ...
42
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_tornadoparser.py
test_it_should_handle_type_error_on_parse_json
assert
collection
34
from webargs.core import json import mock import pytest import marshmallow as ma import tornado.web import tornado.httputil import tornado.httpserver import tornado.http1connection import tornado.concurrent import tornado.ioloop from tornado.testing import AsyncHTTPTestCase from webargs import fields, missing from ...
{}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_tornadoparser.py
get
assert
collection
29
from webargs.core import json import mock import pytest import marshmallow as ma import tornado.web import tornado.httputil import tornado.httpserver import tornado.http1connection import tornado.concurrent import tornado.ioloop from tornado.testing import AsyncHTTPTestCase from webargs import fields, missing from ...
()
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_tornadoparser.py
test_it_should_raise_when_json_is_invalid
assert
numeric_literal
37
from webargs.core import json import mock import pytest import marshmallow as ma import tornado.web import tornado.httputil import tornado.httpserver import tornado.http1connection import tornado.concurrent import tornado.ioloop from tornado.testing import AsyncHTTPTestCase from webargs import fields, missing from ...
400
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_tornadoparser.py
test_it_should_parse_cookies_arguments
assert
collection
38
from webargs.core import json import mock import pytest import marshmallow as ma import tornado.web import tornado.httputil import tornado.httpserver import tornado.http1connection import tornado.concurrent import tornado.ioloop from tornado.testing import AsyncHTTPTestCase from webargs import fields, missing from ...
[2]
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_tornadoparser.py
test_missing_required_field_throws_422
assert
numeric_literal
105
from webargs.core import json import mock import pytest import marshmallow as ma import tornado.web import tornado.httputil import tornado.httpserver import tornado.http1connection import tornado.concurrent import tornado.ioloop from tornado.testing import AsyncHTTPTestCase from webargs import fields, missing from ...
422
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_tornadoparser.py
test_it_should_pass_parsed_as_first_argument
assert
bool_literal
41
from webargs.core import json import mock import pytest import marshmallow as ma import tornado.web import tornado.httputil import tornado.httpserver import tornado.http1connection import tornado.concurrent import tornado.ioloop from tornado.testing import AsyncHTTPTestCase from webargs import fields, missing from ...
True
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_tornadoparser.py
test_it_should_get_single_values
assert
variable
35
from webargs.core import json import mock import pytest import marshmallow as ma import tornado.web import tornado.httputil import tornado.httpserver import tornado.http1connection import tornado.concurrent import tornado.ioloop from tornado.testing import AsyncHTTPTestCase from webargs import fields, missing from ...
value
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_webapp2parser.py
test_parse_querystring_multiple
assert
variable
25
from webargs.core import json import pytest from marshmallow import fields, ValidationError import webtest import webapp2 from webargs.webapp2parser import parser hello_args = {"name": fields.Str(missing="World")} hello_multiple = {"name": fields.List(fields.Str())} hello_validate = { "num": fields.Int( ...
expected
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_webapp2parser.py
test_validation_error_with_message
assert
complex_expr
26
from webargs.core import json import pytest from marshmallow import fields, ValidationError import webtest import webapp2 from webargs.webapp2parser import parser hello_args = {"name": fields.Str(missing="World")} hello_multiple = {"name": fields.List(fields.Str())} hello_validate = { "num": fields.Int( ...
exc.value
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_webapp2parser.py
test_parse_querystring_args
assert
collection
24
from webargs.core import json import pytest from marshmallow import fields, ValidationError import webtest import webapp2 from webargs.webapp2parser import parser hello_args = {"name": fields.Str(missing="World")} hello_multiple = {"name": fields.List(fields.Str())} hello_validate = { "num": fields.Int( ...
{"name": "Fred"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_webapp2parser.py
test_validation_error_with_message
pytest.raises
variable
24
from webargs.core import json import pytest from marshmallow import fields, ValidationError import webtest import webapp2 from webargs.webapp2parser import parser hello_args = {"name": fields.Str(missing="World")} hello_multiple = {"name": fields.List(fields.Str())} hello_validate = { "num": fields.Int( ...
ValidationError)
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_webapp2parser.py
test_parsing_form_default
assert
collection
24
from webargs.core import json import pytest from marshmallow import fields, ValidationError import webtest import webapp2 from webargs.webapp2parser import parser hello_args = {"name": fields.Str(missing="World")} hello_multiple = {"name": fields.List(fields.Str())} hello_validate = { "num": fields.Int( ...
{"name": "World"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_webapp2parser.py
test_parse_invalid_json
pytest.raises
complex_expr
26
from webargs.core import json import pytest from marshmallow import fields, ValidationError import webtest import webapp2 from webargs.webapp2parser import parser hello_args = {"name": fields.Str(missing="World")} hello_multiple = {"name": fields.List(fields.Str())} hello_validate = { "num": fields.Int( ...
json.JSONDecodeError)
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
marshmallow-code/webargs
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
train
train
tests/test_webapp2parser.py
test_parse_files
assert
collection
42
from webargs.core import json import pytest from marshmallow import fields, ValidationError import webtest import webapp2 from webargs.webapp2parser import parser hello_args = {"name": fields.Str(missing="World")} hello_multiple = {"name": fields.List(fields.Str())} hello_validate = { "num": fields.Int( ...
{"baz.txt": "bar", "moo.txt": "zoo"}
e4abfc9cd92fbc8ed17f4b2509f97bc00eb34dcf
173
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_initializers.py
variables_in_range
assert
variable
16
import itertools import numpy as np import pytest from libreco.utils.initializers import ( he_init, truncated_normal, variance_scaling, xavier_init, ) def variables_in_range(variables, mean, std): for v in itertools.chain.from_iterable(variables): assert (mean - 3 * std) <
v
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_feature.py
test_multi_sparse_indices
assert_*
variable
94
import os from dataclasses import astuple from pathlib import Path import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_equal from libreco.data import DatasetFeat from libreco.data.data_info import EmptyFeature, Feature, store_old_info from libreco.feature.multi_sparse import ( ...
j)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_tf_layers.py
test_shared_dense
assert
variable
50
import sys import numpy as np import pytest from numpy.testing import assert_allclose, assert_array_equal from libreco.layers import ( conv_nn, dense_nn, layer_normalization, max_pool, multi_head_attention, shared_dense, tf_dense, tf_rnn, transformer_decoder_layer, transformer_...
v2
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/utils_pred.py
ptest_preds
assert
variable
10
from libreco.prediction import predict_data_with_feats def ptest_preds(model, task, pd_data, with_feats): user = pd_data.user.iloc[0] item = pd_data.item.iloc[0] pred = model.predict(user=user, item=item) # prediction in range if task == "rating": assert 1 <=
pred
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_feature.py
test_assign_features
assert
variable
114
import os from dataclasses import astuple from pathlib import Path import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_equal from libreco.data import DatasetFeat from libreco.data.data_info import EmptyFeature, Feature, store_old_info from libreco.feature.multi_sparse import ( ...
new_df
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/serving/test_serialization.py
check_id_mapping
assert
variable
44
import json import os import numpy as np import pytest from tensorflow.core.protobuf.meta_graph_pb2 import MetaGraphDef from libreco.bases import CfBase, TfBase from libreco.tfops import tf from libserving.serialization import ( embed2redis, knn2redis, online2redis, save_embed, save_knn, save...
user2id
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/serving/test_serialization.py
check_id_mapping
assert
variable
56
import json import os import numpy as np import pytest from tensorflow.core.protobuf.meta_graph_pb2 import MetaGraphDef from libreco.bases import CfBase, TfBase from libreco.tfops import tf from libserving.serialization import ( embed2redis, knn2redis, online2redis, save_embed, save_knn, save...
id2item
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_tf_layers.py
test_layer_norm
assert_*
variable
36
import sys import numpy as np import pytest from numpy.testing import assert_allclose, assert_array_equal from libreco.layers import ( conv_nn, dense_nn, layer_normalization, max_pool, multi_head_attention, shared_dense, tf_dense, tf_rnn, transformer_decoder_layer, transformer_...
labels)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/utils_tf.py
ptest_tf_variables
assert
variable
8
from libreco.tfops import tf def ptest_tf_variables(model): var_names = [v.name for v in tf.trainable_variables()] if hasattr(model, "user_variables"): for v in model.user_variables: assert f"{v}:0" in
var_names
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/serving/test_serialization.py
test_knn_serialization
assert
variable
39
import json import os import numpy as np import pytest from tensorflow.core.protobuf.meta_graph_pb2 import MetaGraphDef from libreco.bases import CfBase, TfBase from libreco.tfops import tf from libserving.serialization import ( embed2redis, knn2redis, online2redis, save_embed, save_knn, save...
model_num
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_collators.py
test_pointwise_collator
assert
variable
125
from io import StringIO import numpy as np import pandas as pd import pytest import torch from libreco.algorithms import DIN, LightGCN, PinSageDGL, RNN4Rec from libreco.batch.batch_data import BatchData from libreco.batch.batch_unit import ( PairFeats, PairwiseBatch, PointwiseBatch, PointwiseSepFeatBa...
dense_len
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_feature.py
test_sparse_indices
pytest.raises
variable
122
import os from dataclasses import astuple from pathlib import Path import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_equal from libreco.data import DatasetFeat from libreco.data.data_info import EmptyFeature, Feature, store_old_info from libreco.feature.multi_sparse import ( ...
KeyError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_als.py
test_als
pytest.raises
variable
78
import pytest from libreco.algorithms import ALS from libreco.algorithms.als import least_squares, least_squares_cg from libreco.evaluation import evaluate from tests.utils_data import SAVE_PATH, remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from t...
TypeError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_item_cf.py
test_item_cf
pytest.raises
variable
54
import numpy as np import pytest from libreco.algorithms import ItemCF from tests.utils_data import remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from tests.utils_save_load import save_load_model @pyte...
TypeError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_collators.py
test_pointwise_collator
assert
variable
121
from io import StringIO import numpy as np import pandas as pd import pytest import torch from libreco.algorithms import DIN, LightGCN, PinSageDGL, RNN4Rec from libreco.batch.batch_data import BatchData from libreco.batch.batch_unit import ( PairFeats, PairwiseBatch, PointwiseBatch, PointwiseSepFeatBa...
sparse_len
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_feature.py
test_sparse_indices
assert
variable
83
import os from dataclasses import astuple from pathlib import Path import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_equal from libreco.data import DatasetFeat from libreco.data.data_info import EmptyFeature, Feature, store_old_info from libreco.feature.multi_sparse import ( ...
dense_cols
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/utils_pred.py
ptest_preds
assert
variable
21
from libreco.prediction import predict_data_with_feats def ptest_preds(model, task, pd_data, with_feats): user = pd_data.user.iloc[0] item = pd_data.item.iloc[0] pred = model.predict(user=user, item=item) # prediction in range if task == "rating": assert 1 <= pred <= 5 else: ass...
cold_pred2
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_als.py
test_als
pytest.raises
variable
35
import pytest from libreco.algorithms import ALS from libreco.algorithms.als import least_squares, least_squares_cg from libreco.evaluation import evaluate from tests.utils_data import SAVE_PATH, remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from t...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_autoint.py
test_autoint
pytest.raises
variable
52
import sys import pytest import tensorflow as tf from libreco.algorithms import AutoInt from tests.models.utils_tf import ptest_tf_variables from tests.utils_metrics import get_metrics from tests.utils_multi_sparse_models import fit_multi_sparse from tests.utils_pred import ptest_preds from tests.utils_reco import pt...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_base.py
test_base
pytest.raises
variable
8
import pytest from libreco.bases import Base def test_base(prepare_pure_data): _, train_data, _, data_info = prepare_pure_data with pytest.raises(
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_bpr.py
test_bpr
pytest.raises
variable
62
import sys import pytest import tensorflow as tf from libreco.algorithms import BPR from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import remove_path from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from test...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_caser.py
test_caser
pytest.raises
variable
69
import sys import pytest import tensorflow as tf from numpy.testing import assert_array_equal from libreco.algorithms import Caser from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds f...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_deepfm.py
test_deepfm
pytest.raises
variable
64
import sys import pytest import tensorflow as tf from libreco.algorithms import DeepFM from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_multi_sparse_models import fit_multi_sparse from tests.utils_pred imp...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_din.py
test_din
pytest.raises
variable
73
import os import sys from pathlib import Path import pandas as pd import pytest import tensorflow as tf from numpy.testing import assert_array_equal from libreco.algorithms import DIN from libreco.data import DatasetFeat, split_by_ratio_chrono from tests.models.utils_tf import ptest_tf_variables from tests.utils_data...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_fm.py
test_fm
pytest.raises
variable
65
import sys import pytest import tensorflow as tf from libreco.algorithms import FM from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import SAVE_PATH, remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_multi_sparse_models import fit_multi_sparse from ...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_graphsage.py
test_graphsage
pytest.raises
variable
131
import sys import pytest import tensorflow as tf from libreco.algorithms import GraphSage from tests.utils_data import remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from tests.utils_save_load import sa...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_graphsage_dgl.py
test_pinsage
pytest.raises
variable
154
import sys import pytest import tensorflow as tf from libreco.algorithms import GraphSageDGL from tests.utils_data import remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from tests.utils_save_load import...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_item_cf.py
test_item_cf
pytest.raises
variable
34
import numpy as np import pytest from libreco.algorithms import ItemCF from tests.utils_data import remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from tests.utils_save_load import save_load_model @pyte...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_lightgcn.py
test_lightgcn
pytest.raises
variable
69
import sys import pytest import tensorflow as tf from libreco.algorithms import LightGCN from tests.utils_data import remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from tests.utils_save_load import sav...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_ncf.py
test_ncf
pytest.raises
variable
64
import sys import pytest import tensorflow as tf from libreco.algorithms import NCF from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends fr...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_ngcf.py
test_ngcf
pytest.raises
variable
75
import sys import pytest import tensorflow as tf from libreco.algorithms import NGCF from tests.utils_data import remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from tests.utils_save_load import save_lo...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_pinsage.py
test_pinsage
pytest.raises
variable
139
import sys import pytest import tensorflow as tf from libreco.algorithms import PinSage from tests.utils_data import remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from tests.utils_save_load import save...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_pinsage_dgl.py
test_pinsage
pytest.raises
variable
162
import sys import pytest import tensorflow as tf from libreco.algorithms import PinSageDGL from tests.utils_data import remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from tests.utils_save_load import s...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_rnn4rec.py
test_rnn4rec
pytest.raises
variable
70
import sys import pytest import tensorflow as tf from numpy.testing import assert_array_equal from libreco.algorithms import RNN4Rec from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_svd.py
test_svd
pytest.raises
variable
57
import sys import pytest import tensorflow as tf from libreco.algorithms import SVD from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends fr...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_svdpp.py
test_svdpp
pytest.raises
variable
59
import sys import pytest import tensorflow as tf from libreco.algorithms import SVDpp from libreco.data import DatasetPure from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import SAVE_PATH, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_pred...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_two_tower.py
test_two_tower
pytest.raises
variable
70
import sys import pytest import tensorflow as tf from numpy.testing import assert_array_equal from libreco.algorithms import TwoTower from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_pred...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_user_cf.py
test_user_cf
pytest.raises
variable
34
import numpy as np import pytest from libreco.algorithms import UserCF from tests.utils_data import remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds from tests.utils_reco import ptest_recommends from tests.utils_save_load import save_load_model @pyte...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_wave_net.py
test_wave_net
pytest.raises
variable
70
import sys import pytest import tensorflow as tf from numpy.testing import assert_array_equal from libreco.algorithms import WaveNet from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pred import ptest_preds...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_wide_deep.py
test_wide_deep
pytest.raises
variable
70
import sys import pytest import tensorflow as tf from libreco.algorithms import WideDeep from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_multi_sparse_models import fit_multi_sparse from tests.utils_pred i...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_youtube_ranking.py
test_youtube_ranking
pytest.raises
variable
70
import sys import pytest import tensorflow as tf from numpy.testing import assert_array_equal from libreco.algorithms import YouTubeRanking from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_multi_sparse_mod...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/models/test_youtube_retrieval.py
test_youtube_retrieval
pytest.raises
variable
69
import pytest import tensorflow as tf from numpy.testing import assert_array_equal from libreco.algorithms import YouTubeRetrieval from tests.models.utils_tf import ptest_tf_variables from tests.utils_data import SAVE_PATH, remove_path, set_ranking_labels from tests.utils_metrics import get_metrics from tests.utils_pr...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_data.py
test_dataset_pure
pytest.raises
variable
75
import os.path from io import StringIO import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from libreco.data import ( DataInfo, DatasetFeat, DatasetPure, TransformedEvalSet, TransformedSet, process_data, ) from l...
IndexError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_data.py
test_dataset_pure
pytest.raises
variable
81
import os.path from io import StringIO import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from libreco.data import ( DataInfo, DatasetFeat, DatasetPure, TransformedEvalSet, TransformedSet, process_data, ) from l...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor
massquantity/LibRecommender
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
train
train
tests/test_initializers.py
test_initializers
pytest.raises
variable
41
import itertools import numpy as np import pytest from libreco.utils.initializers import ( he_init, truncated_normal, variance_scaling, xavier_init, ) def test_initializers(): np_rng = np.random.default_rng(42) mean, std, fan_in, fan_out, scale = 0.1, 0.01, 4, 2, 2.5 variables = truncated...
ValueError)
b0aef08fabb80738dacf160451dae8f7ea5eef25
80
v2_extractor_at_anchor