Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
machine-learning-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GraphPolaris
MachineLearningServices
machine-learning-common
Commits
2c2282d1
Commit
2c2282d1
authored
1 year ago
by
Leonardo Christino
Browse files
Options
Downloads
Patches
Plain Diff
fix: fix link to files
parent
8a05eb35
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
machine_learning_common/MLDriver.py
+2
-6
2 additions, 6 deletions
machine_learning_common/MLDriver.py
with
2 additions
and
6 deletions
machine_learning_common/MLDriver.py
+
2
−
6
View file @
2c2282d1
...
...
@@ -5,12 +5,11 @@
#!/usr/bin/env python
import
traceback
from
MLRepositoryInterface
import
MLServerInterface
from
machine_learning_common.
MLRepositoryInterface
import
MLServerInterface
import
pika
import
json
import
redis
import
os
from
dotenv
import
load_dotenv
##
...
...
@@ -22,8 +21,6 @@ def void(DikkeDraak):
pass
load_dotenv
(
"
../.env.dev
"
)
print
(
os
.
getcwd
())
# We often compare against this specific string, so we clearly define it to prevent any typos
# Python has no constants so we simply give it a very obvious name that implies it is not supposed to be changed
CONST_MLEXCHANGE
=
"
ml-direct-exchange
"
...
...
@@ -39,9 +36,8 @@ credentials = pika.PlainCredentials(rabbit_username, rabbit_password)
# Set up Redis
# THESE PARAMETERS ARE DUMMY PARAMS, WE SHOULD CONNECT TO THE REDIS MICROSERVICE PARAMS
redis_address
=
os
.
getenv
(
"
REDIS_ADDRESS
"
,
default
=
"
redis
"
)
redis_address
,
redis_port
=
os
.
getenv
(
"
REDIS_ADDRESS
"
,
default
=
"
redis
:6379
"
).
split
(
"
:
"
)
redis_password
=
os
.
getenv
(
"
REDIS_PASSWORD
"
)
redis_port
=
os
.
getenv
(
"
REDIS_PORT
"
,
default
=
6379
)
print
(
"
redis address:
"
,
redis_address
,
redis_port
)
print
(
"
rabbit address:
"
,
rabbit_host
,
rabbit_port
)
r
=
redis
.
Redis
(
...
...
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