Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
word2vec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lexworkers
word2vec
Commits
1ddcd8ca
Commit
1ddcd8ca
authored
Oct 31, 2023
by
Damian Raczkowski
Browse files
Options
Downloads
Patches
Plain Diff
add template to gitlab-ci, update to new standard main invocation
parent
0d6ab195
No related branches found
No related tags found
1 merge request
!5
Develop
Pipeline
#14505
passed
Oct 31, 2023
Stage: check_style
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+5
-2
5 additions, 2 deletions
.gitlab-ci.yml
entrypoint.py
+1
-1
1 addition, 1 deletion
entrypoint.py
main.py
+1
-29
1 addition, 29 deletions
main.py
with
7 additions
and
32 deletions
.gitlab-ci.yml
+
5
−
2
View file @
1ddcd8ca
...
...
@@ -8,15 +8,18 @@ stages:
-
check_style
-
build
.check_style_template
:
before_script
:
-
pip install tox==2.9.1
pep8
:
extends
:
.check_style_template
stage
:
check_style
script
:
-
tox -v -e pep8
docstyle
:
extends
:
.check_style_template
stage
:
check_style
script
:
-
tox -v -e docstyle
...
...
This diff is collapsed.
Click to expand it.
entrypoint.py
+
1
−
1
View file @
1ddcd8ca
...
...
@@ -18,4 +18,4 @@ location_params = \
cmd
=
main_cmd
+
location_params
run
(
cmd
,
shell
=
True
)
run
([
"
python3.6
"
,
"
main.py
"
,
"
service
"
])
run
([
"
python3.6
"
,
"
main.py
"
])
This diff is collapsed.
Click to expand it.
main.py
+
1
−
29
View file @
1ddcd8ca
"""
Implementation of hask service.
"""
import
argparse
import
lex_ws
from
src.word2vec_worker
import
W2vWorker
def
get_args
():
"""
Gets command line arguments.
"""
parser
=
argparse
.
ArgumentParser
(
description
=
"
Topic Modeling
"
)
subparsers
=
parser
.
add_subparsers
(
dest
=
"
algorithm
"
)
subparsers
.
required
=
True
subparsers
.
add_parser
(
"
service
"
,
help
=
"
Run as a service
"
)
return
parser
.
parse_args
()
def
main
():
"""
Runs the program.
"""
args
=
get_args
()
generators
=
{
"
service
"
:
lambda
:
lex_ws
.
LexService
.
main
(
W2vWorker
),
}
gen_fn
=
generators
.
get
(
args
.
algorithm
,
lambda
:
None
)
gen_fn
()
if
__name__
==
"
__main__
"
:
main
(
)
lex_ws
.
LexService
.
main
(
W2vWorker
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment