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

Better orion language detection #337

Conversation

ikprk
Copy link
Contributor

@ikprk ikprk commented Jun 24, 2024

No description provided.

@ikprk ikprk requested a review from zeeshanakram3 June 24, 2024 12:41
Copy link
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

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

Please remove src/utils/customMigrations/setOrionLanguage.ts file, as it's no longer used

src/utils/language.ts Outdated Show resolved Hide resolved
src/mappings/content/video.ts Outdated Show resolved Hide resolved
src/utils/customMigrations/setOrionLanguageProvider.ts Outdated Show resolved Hide resolved
@ikprk ikprk requested a review from zeeshanakram3 July 3, 2024 06:44
Copy link
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

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

The PR looks good.

As Dmitry raised question about the QA, how we are going to ensure that the detections are correct? Did you do some testing on small set of data?

@@ -0,0 +1,20 @@
import { Entity, Column, PrimaryColumn } from 'typeorm'

@Entity()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to create this in admin schema

Suggested change
@Entity()
@Entity({ schema: 'admin' })

@zeeshanakram3
Copy link
Contributor

zeeshanakram3 commented Jul 10, 2024

FYI,
I have added the commits to:

@zeeshanakram3
Copy link
Contributor

Found an issue

Updating Orion language with provider failed TypeError: Cannot read properties of undefined (reading 'language')
    at /orion/lib/utils/language.js:22:23
    at Array.map (<anonymous>)
    at predictLanguageWithProvider (/orion/lib/utils/language.js:20:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async updateVideoLanguages (/orion/lib/utils/customMigrations/setOrionLanguageProvider.js:11:33)
    at async detectVideoLanguageWithProvider (/orion/lib/utils/customMigrations/setOrionLanguageProvider.js:45:9)
    at async OrionVideoLanguageManager.updateLoop (/orion/lib/utils/OrionVideoLanguageManager.js:49:13)

For some of the text the language is not returned

@zeeshanakram3 zeeshanakram3 merged commit 6167139 into Joystream:master Jul 10, 2024
7 checks passed
malchililj pushed a commit to malchililj/orion that referenced this pull request Sep 3, 2024
* New model to track orion language processing

* New function to detect language

* New custom migration

* Add cursor tracker and video orion language to offchain export

* Running `custom-migration` command

* Add manger to trigger video language updates

* Adjust orion video language manager to support video update

* Revert "Running `custom-migration` command"

This reverts commit 71c4997.

* Second run of `create-migrations` command

* CR fixes

* move 'orion_offchain_cursor' table to admin schema

* bump package version and add change log

* fix: bug in case detected language is undefined

---------

Co-authored-by: Zeeshan Akram <97m.zeeshan@gmail.com>
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.

2 participants