Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ketos ketos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • public_projects
  • ketosketos
  • Merge requests
  • !253

Merged
Created Jun 24, 2022 by Bruno Padovese@bpadoveseOwner

Fix standardize trim_table argument

  • Overview 0
  • Commits 2
  • Pipelines 1
  • Changes 2

Small fix on the standardize method. Currently, standardize with trim_table=True wont work without the mapper argument set. This merge request fixes this issue.

You can test this bug with the following code (it will throw an error without this branch):

import pandas as pd
from ketos.data_handling import selection_table as sl

annot = pd.DataFrame([{"filename":"sample_audio.wav", "start":2.0, "end":3.0, "label":"A", "duration":1, "offset":50},
                     {"filename":"sample_audio.wav", "start":5.0, "end":6.0, "label":"A",  "duration":1, "offset":50},
                     {"filename":"sample_audio.wav", "start":21.0, "end":22.0, "label":"A",  "duration":1, "offset":50},
                     {"filename":"sample_audio.wav", "start":25.0, "end":27.0, "label":"A",  "duration":1, "offset":50}])


annot_std = sl.standardize(table=annot, labels=["A"], trim_table=True, start_labels_at_1=True)

annot_std
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix_standardize_trim_table_argument