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

LLM extraction schema update #28

Closed
wants to merge 1 commit into from

Conversation

pilar12
Copy link
Collaborator

@pilar12 pilar12 commented Nov 6, 2024

NOMAD Schema updated to reflect latest changes to the pydantic schema

  • Solute section added
  • Ions section added to Perovskite Composition
  • Gas Quenching changed to Bool
  • Names PCE fileds in Stability section updated to match pydantic schema

Summary by Sourcery

Add a new schema package for LLM extraction in the perovskite solar cell database, incorporating new sections for solutes and ions, and update existing schema to reflect changes in the pydantic schema.

New Features:

  • Introduce a new schema package for LLM extraction in the perovskite solar cell database, including sections for solutes, ions, and processing steps.

Enhancements:

  • Update the NOMAD schema to align with the latest pydantic schema changes, including modifications to the stability section and gas quenching field.

@pilar12 pilar12 requested a review from Pepe-Marquez November 6, 2024 16:19
Copy link

sourcery-ai bot commented Nov 6, 2024

Reviewer's Guide by Sourcery

This PR updates the NOMAD schema to align with the latest pydantic schema changes for LLM extraction. The changes introduce a new schema package entry point for LLM extraction and add several new sections and fields to the schema, including Solute and Ion sections, while also modifying existing fields.

Class diagram for updated NOMAD schema

classDiagram
    class LLMSchemaExtractionPackageEntryPoint {
        +load()
    }
    class LightSource {
        +type: MEnum
        +description: str
        +light_intensity: float
        +lamp: str
    }
    class Stability {
        +time: float
        +light_intensity: float
        +humidity: float
        +temperature: float
        +PCE_T80: float
        +PCE_at_the_start_of_the_experiment: float
        +PCE_after_1000_hours: float
        +PCE_at_the_end_of_description: float
    }
    class ProcessingAtmosphere {
        +type: str
        +pressure: float
        +relative_humidity: float
    }
    class Solute {
        +name: str
        +concentration: float
        +concentration_unit: str
    }
    class ReactionSolution {
        +compounds: str[*]
        +volume: float
        +temperature: float
        +solvent: str
        +solutes: Solute[*]
    }
    class ProcessingStep {
        +step_name: str
        +method: str
        +temperature: float
        +duration: float
        +antisolvent: str
        +gas_quenching: bool
        +solution: ReactionSolution
        +atmosphere: ProcessingAtmosphere
    }
    class Deposition {
        +steps: ProcessingStep[*]
        +reviewer_additional_notes: str
        +additional_notes: str
    }
    class Layer {
        +name: str
        +thickness: float
        +functionality: MEnum
        +deposition: ProcessingStep[*]
        +additional_treatments: str
    }
    class Ion {
        +abbreviation: str
        +coefficient: str
    }
    class PerovskiteComposition {
        +formula: str
        +a_ions: Ion[*]
        +b_ions: Ion[*]
        +x_ions: Ion[*]
    }
    class LLMExtractedPerovskiteSolarCell {
        +review_completed: bool
        +DOI_number: str
        +cell_stack: str[*]
        +device_architecture: MEnum
        +pce: float
        +jsc: float
        +voc: float
        +ff: float
        +active_area: float
        +number_devices: int
        +averaged_quantities: bool
        +bandgap: float
        +encapsulated: bool
        +reviewer_additional_notes: str
        +additional_notes: str
        +light_source: LightSource
        +stability: Stability
        +layers: Layer[*]
        +perovskite_composition: PerovskiteComposition
    }
Loading

File-Level Changes

Change Details Files
Added new schema package entry point for LLM extraction
  • Created LLMSchemaExtractionPackageEntryPoint class
  • Added new entry point registration in pyproject.toml
src/perovskite_solar_cell_database/__init__.py
pyproject.toml
Created new schema file with updated structure
  • Defined base schema sections (LightSource, Stability, ProcessingAtmosphere)
  • Added new Solute section for detailed solute information
  • Added Ion section and integrated it into PerovskiteComposition
  • Modified gas_quenching field to boolean type
  • Updated PCE field names in Stability section
  • Created comprehensive LLMExtractedPerovskiteSolarCell schema
src/perovskite_solar_cell_database/llm_extraction_schema.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@pilar12 pilar12 changed the base branch from main to llm-extraction-schema November 6, 2024 16:19
@pilar12 pilar12 closed this Nov 6, 2024
@pilar12 pilar12 deleted the llm-sextraction-schema-update branch November 7, 2024 14:07
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.

1 participant