Skip to content

Conversation

brentgryffindor
Copy link
Collaborator

Pull request information

  • Status: ready to merge
  • Kind of changes:bug fix / new feature / documentation

Description

Implemented setting configuration using command line input. Fix some bug in I210 replay. Added a README in flow/datapipeline



def emission_to_csv_large(emission_path, output_path=None):
"""Do exact same thing as emission_to_csv but handles the memory insufficient issue with large emission file."""
Copy link
Member

Choose a reason for hiding this comment

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

Two comments on this:

  1. Can you specify in the docstring what has changed from the default emission_to_csv method?
  2. This looks like a lot of code duplication. Can we merge it into emission_to_csv and just add an input parameter to the method to handle this situation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is exactly the same with emission_to_csv except it handles the XML file in a different way that won't cause memory overflow. Maybe I should just replace emssion_to_csv with this new method.

extra_info, source_id, run_id = self.pipeline_params
veh_ids = self.k.vehicle.get_ids()
get_extra_info(self.k.vehicle, extra_info, veh_ids, source_id, run_id)
except AttributeError as e:
Copy link
Member

Choose a reason for hiding this comment

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

Can we be specific (with a comment) what issue you expect to catch here? This can potentially catch a lot of errors later on, and we want to be sure not to have can unexpected behaviors as a result of that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment added, this is essential for cases where the attribute pipeline_params is not added to this instance.

Copy link
Member

@AboudyKreidieh AboudyKreidieh left a comment

Choose a reason for hiding this comment

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

Few minor comments, but then happy to merge.

Copy link
Member

@AboudyKreidieh AboudyKreidieh left a comment

Choose a reason for hiding this comment

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

LGTM

@eugenevinitsky eugenevinitsky merged commit 5746937 into i210_dev Jun 18, 2020
@eugenevinitsky eugenevinitsky deleted the datapipeline_dev_v2 branch June 18, 2020 22:34
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.

4 participants