{"id":15905954,"url":"https://github.com/lucacappelletti94/keras_mixed_sequence","last_synced_at":"2025-10-10T11:03:55.250Z","repository":{"id":45451592,"uuid":"235881330","full_name":"LucaCappelletti94/keras_mixed_sequence","owner":"LucaCappelletti94","description":"Lazily loading mixed sequences using Keras Sequence, focused on multi-task models.","archived":false,"fork":false,"pushed_at":"2024-02-03T09:40:49.000Z","size":27254,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T22:42:41.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LucaCappelletti94.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-23T20:35:35.000Z","updated_at":"2021-12-13T11:06:23.000Z","dependencies_parsed_at":"2024-10-28T10:21:45.218Z","dependency_job_id":"c81e3b88-86db-4fe5-a2b0-5a267aa752a7","html_url":"https://github.com/LucaCappelletti94/keras_mixed_sequence","commit_stats":{"total_commits":81,"total_committers":2,"mean_commits":40.5,"dds":"0.012345679012345734","last_synced_commit":"4081cb47e81c170b0f00d2d72ad0a108f3e7656d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/LucaCappelletti94/keras_mixed_sequence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaCappelletti94%2Fkeras_mixed_sequence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaCappelletti94%2Fkeras_mixed_sequence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaCappelletti94%2Fkeras_mixed_sequence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaCappelletti94%2Fkeras_mixed_sequence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucaCappelletti94","download_url":"https://codeload.github.com/LucaCappelletti94/keras_mixed_sequence/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaCappelletti94%2Fkeras_mixed_sequence/sbom","scorecard":{"id":86044,"data":{"date":"2025-08-11","repo":{"name":"github.com/LucaCappelletti94/keras_mixed_sequence","commit":"4081cb47e81c170b0f00d2d72ad0a108f3e7656d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 1.0.28 not signed: https://api.github.com/repos/LucaCappelletti94/keras_mixed_sequence/releases/55173066","Warn: release artifact 1.0.28 does not have provenance: https://api.github.com/repos/LucaCappelletti94/keras_mixed_sequence/releases/55173066"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T06:57:45.892Z","repository_id":45451592,"created_at":"2025-08-15T06:57:45.892Z","updated_at":"2025-08-15T06:57:45.892Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003724,"owners_count":26083610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T13:20:20.491Z","updated_at":"2025-10-10T11:03:55.224Z","avatar_url":"https://github.com/LucaCappelletti94.png","language":"Python","readme":"keras_mixed_sequence\n=========================================================================================\n|pip| |downloads|\n\nLazily loading mixed sequences using Keras Sequence,\nfocused on multi-task models.\n\nHow do I install this package?\n----------------------------------------------\nAs usual, just download it using pip:\n\n.. code:: shell\n\n    pip install keras_mixed_sequence\n\n\nUsage examples\n----------------------------------------------\n\nExample for traditional single-task models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nFirst of all let's create a simple single-task model:\n\n.. code:: python\n\n    from tensorflow.keras.layers import Dense\n    from tensorflow.keras.models import Sequential\n\n    model = Sequential([\n        Dense(1, activation=\"relu\")\n    ])\n    model.compile(\n        optimizer=\"nadam\",\n        loss=\"relu\"\n    )\n\nThen we proceed to load or otherwise create the training data.\nHere there will be listed, in the future, some custom\nSequence objects that have been created for the purpose\nof being used alongside this library.\n\n.. code:: python\n\n    X = either_a_numpy_array_or_sequence_for_input\n    y = either_a_numpy_array_or_sequence_for_output\n\nNow we combine the training data using the MixedSequence\nobject.\n\n.. code:: python\n\n    from keras_mixed_sequence import MixedSequence\n\n    sequence = MixedSequence(\n        X, y,\n        batch_size=batch_size\n    )\n\nFinally, we can train the model:\n\n.. code:: python\n\n    from multiprocessing import cpu_count\n\n    model.fit_generator(\n        sequence,\n        steps_per_epoch=sequence.steps_per_epoch,\n        epochs=2,\n        verbose=0,\n        use_multiprocessing=True,\n        workers=cpu_count(),\n        shuffle=True\n    )\n\n\nExample for multi-task models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nFirst of all let's create a simple multi-taks model:\n\n.. code:: python\n\n    from tensorflow.keras.models import Model\n    from tensorflow.keras.layers import Dense, Input\n\n    inputs = Input(shape=(10,))\n\n    output1 = Dense(\n        units=10,\n        activation=\"relu\",\n        name=\"output1\"\n    )(inputs)\n    output2 = Dense(\n        units=10,\n        activation=\"relu\",\n        name=\"output2\"\n    )(inputs)\n\n    model = Model(\n        inputs=inputs,\n        outputs=[output1, output2],\n        name=\"my_model\"\n    )\n\n    model.compile(\n        optimizer=\"nadam\",\n        loss=\"MSE\"\n    )\n\nThen we proceed to load or otherwise create the training data.\nHere there will be listed, in the future, some custom\nSequence objects that have been created for the purpose\nof being used alongside this library.\n\n.. code:: python\n\n    X = either_a_numpy_array_or_sequence_for_input\n    y1 = either_a_numpy_array_or_sequence_for_output1\n    y2 = either_a_numpy_array_or_sequence_for_output2\n\nNow we combine the training data using the MixedSequence\nobject.\n\n.. code:: python\n\n    from keras_mixed_sequence import MixedSequence\n\n    sequence = MixedSequence(\n        x=X,\n        y={\n            \"output1\": y1,\n            \"output2\": y2\n        },\n        batch_size=batch_size\n    )\n\nFinally, we can train the model:\n\n.. code:: python\n\n    from multiprocessing import cpu_count\n\n    model.fit_generator(\n        sequence,\n        steps_per_epoch=sequence.steps_per_epoch,\n        epochs=2,\n        verbose=0,\n        use_multiprocessing=True,\n        workers=cpu_count(),\n        shuffle=True\n    )\n\n\n.. |pip| image:: https://badge.fury.io/py/keras-mixed-sequence.svg\n    :target: https://badge.fury.io/py/keras-mixed-sequence\n    :alt: Pypi project\n\n.. |downloads| image:: https://pepy.tech/badge/keras-mixed-sequence\n    :target: https://pepy.tech/badge/keras-mixed-sequence\n    :alt: Pypi total project downloads\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacappelletti94%2Fkeras_mixed_sequence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucacappelletti94%2Fkeras_mixed_sequence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacappelletti94%2Fkeras_mixed_sequence/lists"}