Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio PR 4 - File List Reader and Meta-data reader #23

Open
wants to merge 11 commits into
base: swetha/audio_pr3/pre_emphasis_filter
Choose a base branch
from

Conversation

swetha097
Copy link
Owner

@swetha097 swetha097 commented Aug 2, 2023

  1. Add support for file_list_reader to read source files from file_list instead of folder_path (similar to file_source_reader)
  2. Add support for meta-data reader (label_reader_file_list) to read and add labels to map from file_list.txt

@swetha097 swetha097 self-assigned this Aug 2, 2023
@swetha097 swetha097 added the audio label Aug 2, 2023
@swetha097 swetha097 requested a review from SundarRajan28 August 3, 2023 04:35
Copy link
Collaborator

@snehaa8 snehaa8 left a comment

Choose a reason for hiding this comment

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

Please address these minor review comments wrt to formatting

FileListReader();

private:
//! opens the folder containnig the images
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please check spelling

_curr_file_idx = 0;
}


Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove extra blank lines

Copy link
Owner Author

Choose a reason for hiding this comment

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

Done

continue;
}
_in_batch_read_count++;
_in_batch_read_count = (_in_batch_read_count%_batch_count == 0) ? 0 : _in_batch_read_count;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add space before and after % if its the norm in MIVisionX too.

if(_in_batch_read_count > 0 && _in_batch_read_count < _batch_count)
{
replicate_last_image_to_fill_last_shard();
LOG("FileReader ShardID [" + TOSTR(_shard_id) + "] Replicated " + _folder_path+_last_file_name + " " + TOSTR((_batch_count - _in_batch_read_count) ) + " times to fill the last batch")
Copy link
Collaborator

Choose a reason for hiding this comment

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

change
_folder_path+_last_file_name
to
_folder_path + _last_file_name

continue;
}
_in_batch_read_count++;
_in_batch_read_count = (_in_batch_read_count%_batch_count == 0) ? 0 : _in_batch_read_count;
Copy link
Collaborator

Choose a reason for hiding this comment

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

add spaces appropriately

@@ -27,7 +27,7 @@ THE SOFTWARE.
/// \param rocal_context
/// \param source_path path to the folder that contains the dataset or metadata file
/// \return RocalMetaData object, can be used to inquire about the rocal's output (processed) tensors
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add docs for file_list_path

Copy link
Owner Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,54 @@
/*
Copyright (c) 2019 - 2023 Advanced Micro Devices, Inc. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change this 2023 since audio support has been added in this year and this is a new file. Change the copyright year for all new files to 2023

void reset() override;

//! Returns the name of the latest file opened
std::string id() override { return _last_id;};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add space after ;

file_path = _folder_path + "/"+ file_path;


// std::cout << "\n entry Path String" << entry_path << '\n';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove all debug statements in this file

std::vector<std::string> entry_name_list;
// open_subdirectory(_folder_path.c_str());
auto ret = Reader::Status::OK;
std::ifstream fp (_file_list_path);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove space before (

// std::cout << "\n entry Path String" << entry_path << '\n';

// std::cout << filesys::is_regular_file(entry.path()) << "\n";
if (filesys::is_regular_file(file_path ))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove extra spaces before and after ()

Copy link
Collaborator

@SundarRajan28 SundarRajan28 left a comment

Choose a reason for hiding this comment

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

@swetha097 Please resolve the spacing issues in all new files added to the branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants